netdev
[Top] [All Lists]

Re: Retrieving in.terface statistics frequently and without pain

To: rsharpe@xxxxxxxxxx
Subject: Re: Retrieving in.terface statistics frequently and without pain
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Sun, 14 Oct 2001 11:27:31 -0700
Cc: netdev@xxxxxxxxxxx
Organization: Candela Technologies
References: <3BC8F5DD.2050602@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Richard Sharpe wrote:
> 
> Hi,
> 
> What is the quickest way to retrieve interface statistics quickly and
> without pain?

cat /proc/net/dev


It has plenty of stats..you just have to parse the ascii file to
get the numbers you need...

> 
> I am interested in seeing bytes in and out as well as packets in and
> out. I am also interested in seeing collisions.
> 
> If the interface was in promiscuous mode, would packets and bytes in/out
> count total traffic on the wire?
> 
> I notice that there is no SIOCGIFSTATS IOCTL. Would such a thing be
> desirable?
> 
> --
> Richard Sharpe, rsharpe@xxxxxxxxxx, LPIC-1
> www.samba.org, www.ethereal.com, SAMS Teach Yourself Samba
> in 24 Hours, Special Edition, Using Samba

-- 
Ben Greear <greearb@xxxxxxxxxxxxxxx>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

<Prev in Thread] Current Thread [Next in Thread>