diagnostics

Analyze .exe/.dll (Windows PE) files for code bloats

Let's say I have a project with a dozen of different modules which produce one resultant DLL, how can I analyze it so that I can identify the actual file size that each module/functions contribute? I know it might be impossible with a Release build where much information has been stripped, but how about if I have the full source and can ...

MacOSX API for CPU load on each core

How do I get the load on each CPU core on my Mac, just like Activity Monitor does? Is there an API or a command line tool whose output I can parse? ...

WCF: How to diagnose faulted channels?

I'm working on shipping in a change for my lab that will hopefully help diagnose some weird channel-faulting weirdness we're seeing. There's a test application that uses DuplexChannelFactory to connect to a couple windows services, and for some reason the channels on this test application seem to be faulting quite a bit. I have plans to ...

Does Visual Studio continuously compile?

When working in VS, the error messages in the bottom panel are compiler errors and warnings, right? Does this mean the app is being compiled all the time? I would expect those to appear only when trying to run the app. This is probably a silly question, but I cannot find the answer. ...

Get a number of open sockets in C#?

I'm trying to log the number of open sockets in my C# server application. Like the info you could get from "netstat -s": TCP Statistics for IPv4 Active Opens = 22765 Passive Opens = 9316 I could parse the result from "netstat".. but if there's a class for it, then why would I.. By the...

What are the differences between a hang that prevents Windows from ending a login session and a hang that does not?

Inevitably, I run into programs that will have a user interface that hangs. However, I can divide those programs into two types: There are the hangs that prevent a Windows session from ending, and there are the hangs that do not prevent a Windows session from ending. How can that difference be used to help diagnose the root cause of the ...

Get network tracing information without enabling tracing

I'm writing a little proxy server, and I'm trying to debug a problem. If I refresh the browser twice quickly, my proxy throws an exception, usually with no stack trace or indication of where the problem is. I have a hunch it has to do with a socket being closed prematurely by the browser, or being used for two different requests in my pr...

Calling GetAvailableThreads for different thread pools

I've used the ThreadPool.GetAvailableThreads to monitor the thread usage in a web site, and written the results to a performance counter. To do this, I've had a thread running in the site that does the monitoring. I'd like to be able to monitor this without modifying sites' code. Is there a way I can write a console app that would be abl...