Network Statistics [was: [lug] Router Recommendation]

D. Frye dafr at peakpeak.com
Mon Aug 29 18:33:58 MDT 2005


On Mon, Aug 29, 2005 at 05:57:29PM -0600, David L. Anselmi wrote:
} Hugh Brown wrote:

<snip>

} [...]
} >Here's a sample of the weirdness I've seen.  I have a cronjob that runs
} >every 6 hours and greps the RX line from ifconfig.  Uptime on the box is
} >93 days.  Box is misleading though, since it is an instance of UML.
} >
} >2005-08-16:18:  RX bytes:4250747146 (3.9 GiB)  TX bytes:466814358 (445.1
} >MiB)
} >2005-08-17:00:  RX bytes:4266423260 (3.9 GiB)  TX bytes:467046431 (445.4
} >MiB)
} >2005-08-17:06:  RX bytes:4281988308 (3.9 GiB)  TX bytes:467141907 (445.5
} >MiB)
} >2005-08-17:12:  RX bytes:2901362 (2.7 MiB)  TX bytes:467493415 (445.8
} >MiB)
} >2005-08-17:18:  RX bytes:18624117 (17.7 MiB)  TX bytes:467968541 (446.2
} >MiB)
} >2005-08-18:00:  RX bytes:34502883 (32.9 MiB)  TX bytes:468440581 (446.7
} >MiB)
} >2005-08-18:06:  RX bytes:49337141 (47.0 MiB)  TX bytes:468519834 (446.8
} >MiB)
} 
} Well, is UML showing you a virtual interface or the actual NIC?  Not 
} that it matters but it may be important for understanding what you see.
} 
} But the above looks a whole lot like you've got a 32 bit counter 
} wrapping around (2^32 = 4.3 GiB).  Maybe you need to read the counter 
} and set it back to zero (the iptables accounting or stuff in snmp or 
} whatever monitoring packages like nagios or cricket use might be easier 
} to use).

If you are just looking for an overall network utilization for each
interface, you may want to look at <humdi.net/vnstat/>. I've been using
it for a few months now just to track what is going through my home
internet connection. It looks like it is using the same statistics that
your script looks at, it just makes it pretty and usable for you.


-- 

D. Frye
dafr AT dafr.us
dafr AT peakpeak.com
http://www.dafr.us/dafr




More information about the LUG mailing list