0

I need to monitor average network bytes sent/received per second over a period of time from command line, but only for network traffic sent/received by a certain process or port.

I am currently able to monitor all network traffic using:

logman create counter -n CounterName -c "\Network Interface(*)\Bytes Total/sec" -f csv -o C:\output.log -si 1

which gives me a CSV of network total bytes/sec at 1 second intervals which I can then parse and determine an average, but I need to be able to monitor traffic only sent/received on a single port or by a single process (port would be better)

I've done a good amount of googling and can't find anything built in to Windows to do this. (I've looked at netstat also). I am open to any free third party tools that can do this, they just need to be able to be run from command line and produce some kind of log.

1 Answer 1

0

If you want to implement something yourself, you can write a Upper-Layer Windows Filter driver:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff564862(v=vs.85).aspx#possible_driver_layers

1
  • Hmm, interesting but I need something that can run on any version of Windows without any software/driver installation. I'm doing automated QA testing and I have MANY different Windows VMs that I need to be able to do this on without going to each one and installing a driver and taking a new snapshot. Also I wouldn't know where to begin writing my own driver, but I kind of want to find out just out of curiosity/
    – mclaassen
    Nov 14, 2012 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.