views:

203

answers:

2

Hello everyone,

I am using Networking Tab of Windows Task manager to monitor local network traffic to test how much bandwidth my application will use. My scenario is, I will use a local console client application to send data (using Http POST method) to local IIS 7.0 server.

My issue is no traffic could be monitored using Networking Tab of Windows Task manager. My environment is, VSTS 2008 + C# + .Net 3.5 + Windows Vista x86 Enterprise. Any ideas what is wrong?

thanks in advance, George

+1  A: 

Traffic in local loopback scope is not monitored as it don't really use the network. I guess you will have to collect these statistics programatically in your own program, unless you have another machine.

Havenard
I access local IIS 7.0 server by using http://<local_machine_name>/xxx.aspx (I am not using localhost or 127.0.0.1), even in this way, loopback is used other than the real network adapter?
George2
Yes, if you put your own IP address, even if its the Internet IP, the system is smart and will know it don't need to go to the network.
Havenard
For a single computer, any idea to test network traffic consumption?
George2
I've updated my answer with this solution [:)]
Havenard
"collect these statistics programatically" -- can you say something more, how to get traffic statistics in my code?
George2
Simply register a count of every byte you send, thats it. If you want to know the speed, you can store the size of the last packet and divide by the time between each send() or something like that...
Havenard
Thanks, looks like a lot of work... I have to use two machines? Does two Virtual PC machine on a single machine works?
George2
+1  A: 

I imagine that as it's all local, I belive Windows will resolve localhost and not forward it to the NIC, thus not producing any network traffic.

Jaimal Chohan
Thanks 1. I access local IIS 7.0 server by using http://<local_machine_name>/xxx.aspx (I am not using localhost or 127.0.0.1), even in this way, loopback is used other than the real network adapter? 2. For a single computer, any idea to test network traffic consumption?
George2
Check out this page (http://wiki.wireshark.org/CaptureSetup/Loopback) on the Wireshark wiki that addresses the issue. Basically you can't do it by default on a Windows machine, but there are some workarounds.
Jaimal Chohan
Thanks, I read the tutorial and seems it deals with how to monitor packages, but my requirement is to monitor network traffic volumn (not interested in specific network package content). Any advice?
George2