Network adapters

  • Thread starter Thread starter Joza
  • Start date Start date
J

Joza

Hi!

Can somebody help me how to detect how much
bytes my network adapters received and sent?
I have enumerated all network adapters and i found
an example how to detect current speed, but i have
no idea for detecting current bytes that my adapters
receives. I was trying with ipv4globalstatics but the
result that i get i total bytes not current.
 
Hi,

You can get the current bytes/second from the performance counters:

Network Interface -> Bytes Received/sec -> Your Adapter
Network Interface -> Bytes Sent/sec -> Your Adapter
Network Interface -> Bytes Total/sec -> Your Adapter

You can see the list of all available performance counters inside Visual
Studio's Server Explorer - expand Servers\your machine and look at
Performance Counters.

Hope this helps
Martin Dechev
 
Back
Top