Messages in this thread |  | | Date | Sun, 7 Jan 2001 21:55:58 +0100 (CET) | From | Sasi Peter <> | Subject | Re: 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/
|  |