lkml.org 
[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Speed of the network card
On Mon, 8 Jan 2001, Chris Wedgwood wrote:

> I would like to determine the banwidth the card is getting from
> the network.
> /proc/net/dev exports counters; you can monitor those -- I'm sure
> there are perfomance program that do exactly this.

I have this little script for monitoring interfaces' speed on 132
wide textmode console w/ niche histogram. It is not perfect but 'it
works for me' (tm).

--------------------------> cut here
if [ "$1" = "" ]
then
echo "Please specify the sampling rate."
exit
fi

while true
do
cat /proc/net/ip_fwnames &
sleep $1
done |
awk '
BEGIN {
s=0
d='$1'*1024*1024
wd=d/15
}

/^input / {o=s
s=$7}
/^output / {s+=$7
w=(s-o)/wd
if(w>130)w=0
printf "%fMB/s %0*c\n",(s-o)/d,w,">"}
'
--------------------------> cut here

--
SaPE - Peter, Sasi - mailto:sape@sch.hu - http://sape.iq.rulez.org/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.056 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site