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.