Re: NetLoad applet problems
- From: Martin Baulig <martin home-of-linux org>
- To: Stephen Robert Norris <srn fn com au>
- cc: Martin Baulig <martin home-of-linux org>, Greg Fall <gmf dweezil dyn ml org>, gnome-list gnome org
- Subject: Re: NetLoad applet problems
- Date: Sun, 22 Nov 1998 21:59:49 +0100 (CET)
On Sun, 15 Nov 1998, Stephen Robert Norris wrote:
> On 2.0.33 at least, /proc/net/dev contains a count of packets, not bytes...
> That's why I didn't use it. My plan (before real life took up 110% of my time)
> was to use accounting if it was there, and packet counting if not...
Well, byte counting was added to /proc/net/dev on 2.1.xx (don't know where
exactly, on 2.1.114 it's there).
In LibGTop I'm now doing the following:
* get address, subnet and mtu via ioctl calls
* try to get statistics via /proc/net/ip_acct - if this works, return
* otherwise, parse /proc/net/dev, check whether it already has byte
conting and use it.
* if using /proc/net/dev, errors and collisions are also available ...
In the NetLoad applet I'm using the byte counters from libgtop - and it
this fails, the packet counters (kernel 2.0.xx and no IP accounting).
Martin
-----------------------------------------------------------------
Martin Baulig - Angewandte Mathematik - Universitaet Trier
martin@home-of-linux.org, http://www.home-of-linux.org/
------------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]