1

I'm working on a script that has to monitor my computer, network, and a few other things. In my network check, I have psutils doing so, but I'm largely illiterate when it comes to networks -- this is the check and a possible response from the examples page:

 >>> psutil.net_io_counters(pernic=True)
{'eth0': netio(bytes_sent=485291293, bytes_recv=6004858642, packets_sent=3251564, packets_recv=4787798, errin=0, errout=0, dropin=0, dropout=0),
 'lo': netio(bytes_sent=2838627, bytes_recv=2838627, packets_sent=30567, packets_recv=30567, errin=0, errout=0, dropin=0, dropout=0)}

Does this seem to be checking current network traffic in a time-period or is it actually sending its own packets? If it's sending its own, then why is the received higher than the sent? errin, errout, dropin, and dropout is a measure of errors and drops sent and received, I'm guessing -- but what might be a good baseline for a home network in these areas? More simply put: what sort of numbers are unusual enough that I should inform the application of degradation and send an email or text or etc?

I realize I can just run this thing for a day to get a good idea, but I'm also worried about outliers that might happen occasionally that are normal, etc.

Thanks.

linus72982
  • 1,418
  • 2
  • 16
  • 31
  • Its not sending its own, its just pulling the information from the OS -- same as if you were to type `ifconfig` in linux or in Windows, `netstat -e -s` or a [similar command](http://stackoverflow.com/questions/718762/get-the-cumulative-bytes-sent-and-received-from-a-nic). – jedwards Mar 13 '15 at 03:30

0 Answers0