-1

I'm using psutil library to obtain some system network information. Unfortunately it seems the values I'm getting are in-correct. I know for a fact that the bytes received and sent on ethernet 4 is not 556MB/71MB. When I view performance from task manager, the Ethernet is stilling at 0 - 30 Kbps. Why am I getting such large values?

Interface Name - Ethernet 4
Bytes Receive - 556.203 MB
Bytes Sent - 71.558 MB
Drop In - 9447
Drop out - 0
Error In - 0
Error Out - 0
Packets Received - 7702423
Packets Sent - 395453
tyleax
  • 1,556
  • 2
  • 17
  • 45

1 Answers1

0

Found out the stats are the total stats, not stats per second. Need psutil.net_io_counters() twice with a 1 second sleep between to calculate the stats per second.

tyleax
  • 1,556
  • 2
  • 17
  • 45