diagnostics

Check if machine is UP/ALIVE

Hello, I want to check if a remote machine is already up (after a reboot/reimage) using C#. Right now, All I can think of is run a PING command and check if the machine will reply. Are there any elegant ways? Thanks! EDIT One of my concern is that PING usually respond ONCE the machine has started Windows. Some of the services may no...

Is hardware impossible to debug without software?

Disclaimer: I am (mostly) hardware ignorant. This is probably my problem. However I find it hard to accept that it is not possible to debug hardware so therefore I just wanted to get some second opinions. We have an issue. Where certain actions (swapping Usb devices in and out at run-time) can blow either the Usb hub or chip on our Usb ...

How can I most accurately calculate the execution time of an ASP.NET page while also displaying it on the page

I want to calculate the execution time of my ASP.NET pages and display it on the page. Currently I'm calculating the execution time using a System.Diagnostics.Stopwatch and then store the value in a log database. The stopwatch is started in OnInit and stopped in OnPreRenderComplete. This seems to be working quite fine, and it's giving ...

C: what should I use for trace/diagnostic messages in a library?

In .NET I would use System.Diagnostics.Trace... What would I use in C or C++ ? right now I have a macro defined: diagnostics ON: #define DIAG(A) { printf(A); } debugging off: #define DIAG(A) { if(FALSE) {}} Is there a standard way? ...

realtime logging

I have an application which has a loop, part of a "Scheduler", which runs at all time and is the heart of the application. Pretty much like a game loop, just that my application is a WPF application and it's not a game. Naturally the application does logging at many points, but the Scheduler does some sensitive monitoring, and sometimes ...

Diagnosing the .NET Legacy

Assume you are taking over a legacy .NET app. [pre - 3.0] written in C# What are the top 5 diagnostic measures, profiling or otherwise that you would employ to assess the health of the application? I am not just looking at the "WHAT" part of diagnosis but also at the "HOW". For e.g. It is indeed necessary to assess fast/optimum respons...

IE7 and 8 Hangs Randomly on CSS Images

We have an ASP.NET 3.5 application that has been in production for over a year. Our last release was a couple of months ago. We use CSS for styling and application of background images to divs and such. The server is Windows 2003 with IIS. Suddenly, this week, we have had reports from some users that the page seems to hang up while l...

Security for ASP.NET Diagnostics page

I'm thinking of creating a diagnostics page for an ASP.NET app, which would be mostly intended for admin use to get more information about the application for diagnosing problems. Examples of the info the page might have : System.Environment.MachineName (might be useful in web farm scenarios) System.Environment.Version Environment.Use...

List of all gcc diagnostics

I need a link to a webpage that lists all the error messages and warnings GCC can show; the actual messages, not descriptions. It would be preferable if the list is in the order of most frequently encountered diagnostics. ...

TraceSource.TraceTransfer vs TraceSource.TraceEvent(TraceEventType.Transfer ...

When using System.Diagnostics TraceSource for logging/tracing, is there a difference between using TraceSource.TraceTransfer and TraceSource.TraceEvent(TraceEventType.Transfer, ... ? In our environment, we will be developing a number of services that will communicate via WCF. We are also evaluating what platform we should use for loggi...

Simple round robin (moving average) array in C#

As a diagnostic, I want to display the number of cycles per second in my app. (Think frames-per-second in a first-person-shooter.) But I don't want to display the most recent value, or the average since launch. What I want to calculate is the mean of the last X values. My question is, I suppose, about the best way to store these values...

No Event Logs in Diagnostic on Windows Azure?

I'm trying to get .NET Remoting to work on Windows Azure, with a web role. I get a 500 internal server error when trying to access the URL. I've tried using Azure MMC (http://code.msdn.microsoft.com/windowsazuremmc), but I'm only able to get Infrastructure Logs. No Event Logs, Azure Logs or similar. What am I doing wrong? I've tried sett...

C#: How to get the size of available system memory?

Is it possible to get the size of system available memory in C#.NET? if yes how? ...

Diagnosing pathological behavior of a piece of cluster software

I'm using a kind of load balancer over a small cluster that is able to achieve >2000rps on zero-duration requests (t.i. ones that are immediately satisfied by the worker nodes). But as soon as the requests stop being zero-duration and start taking even 1ms, performance immediately drops >10x. The data being transfered in both directions...

Meaningful diagnostic messages

Hi, Looking at several posts, I get a feel that many of the questions arise because compilers/implemenetation do not emit a very meaningful message many times (but not always). This is especially true in the case of templates where error messages could be at the least very daunting. A case in point could be the discussion topic Therefo...

ajax diagnose tool for internet explorer

hey guys, i am searching for a tool, that displays ajax requests in ie like firebug does it in ff. do you know any free, easy 2 use , easy 2 install ... add-on/plug in for IE (8)? thanks for help ...

How to identify the caller of a Stored Procedure from within the Sproc

I have a depricated stored procedure which should no longer be called from code, but there is some system which is still calling it. This is a production server so I have very limited indirect access to it for performing diagnostics. Is there any way to determine the machine which is calling a particular stored procedure from within th...

Creating an ASP.NET diagnostics page to be pinged by Load Balancer

Our server operations team has asked the web development team (ASP.NET) to provide a URL in our application, which the load balancer can ping to perform health checks. What should be executed on this page? I think we should attempt a database connection to ensure connectivity between the web and database. Anything else? ...

I am a process, how much CPU do I consume?

Is there a way (.net 2.0) for a process to know EXACT amount of processor usage it consumes (something like it would be seen in processexplorer properties/performance graph). Please, don't go much further then semi-esoteric questions (p-Invoke OK) Also, so I don't open yet another question - how can I (as a process) control my own affi...

Unable to capture Performance Counters for an Azure Web Role

Hi, I am trying to capture the following PerformanceCounters on the Azure WebRole: private string[] perfCounters = { @"\Processor(_Total)\% Processor Time", @"\ASP.NET Applications(__Total__)\Requests/Sec", @"\Memory\Available Bytes", @"\...