views:

219

answers:

3

I have a .NET windows service that does a lot of network magic (WMI, Ping, etc - the list is very long). I would like to profile, with as much ease and detail as possible, how much bandwidth the application uses in total as well each part in the code.

Are there any tools that can help me do that? Ants profiler for example will help me with memory profiling and processor utilization profiling. However it doesn't do much with network profiling. Is there anything like ANTs for network profiling? If not, then what are my options when it comes to getting this information?

Thanks

In Response to some answers: added for clarification

Whatever the tool, if it cannot directly link to the code (which I don't think is possible) it needs to be able to run unattended for days keeping track (logging to a file or database) of the network traffic used by a process. It must be able to directly specify the process (which wireshark cannot do). Microsoft Network Monitor can do that, however, it does so much more (so much parsing - frame by frame) that its not usable because of performance issues (after a few hours of running I already have a million frames to tally up. If i try to copy the stuff into excel or a database, the copy alone takes over 30 minutes).

Really, it would seem like such a simple thing to do, however, I’m having a surprisingly hard time finding a tool that would do what i want.

+1  A: 

You can make use of the utility Wireshark to capture all packets going out of the machine the service is running on. You can then filter those packets based on the content within it to limit to those packets that you care about. Using that information you can find the metrics you're looking for.

Agent_9191
That could possibly work but its not easy at all. For one thing it doesn't seem like you can filter by process which would be huge for something like this. Secondly, it doesn't link it to the code at all (like ANTs profiler does memory and processor performance). So yes, this is a step but i'm looking for more.
Mark
The reason why it is hard is because of the fact that you're trying to track out-of-process information and correlate it to in-process attributes. The reason those other tools work so well is because it's all related to the managed, in-process code. If you're making use of WCF you might be able to track a little bit better, but you're still dealing with the OoP issue.
Agent_9191
A: 

You can try the MS Visual Roundtrip Analyzer (which uses MS Network Monitor), or perhaps just Network Monitor itself.

Patrick Cuff
+1  A: 

I quite like SocketSniff. It attaches to a single running process, and shows all socket related traffic. It doesn't have great decoding like WireShare does, but it removes a lot of the noise as well.

brianegge