mrtg und gigabit

Jan 'Red Bully' Seiffert redbully at cc.fh-luh.de
Tue Jun 7 21:55:36 CEST 2005


Florian Lohoff schrieb:
> On Tue, Jun 07, 2005 at 09:03:17PM +0200, Florian Lohoff wrote:
> 
[snip snap]
> sed -ne "/${IFACE}:/ { s/.*://; p; }" </proc/net/dev |\
>         awk '{ print $1 "\n" $9 "\n0\nhostname" }'
> 
> Problem ist das man nicht einfach den field seperator im awk auf " "
> setzen kann und 1 und 9 via
> 
> awk ' /eth0/ { print $1 "\n" $9 "\n0\nhostname" }'
> 
> ausgeben kann weil:
> 
> source:~# grep eth0 /proc/net/dev
>   eth0:2844746097 3835226870 185378 181020  965  4358          0 102 2626704682 2501488603    0    0    0 15642       0          0
> 
> Es fehlt da ein space *soifz*
> 
sed -ne "/eth0:/ { s/.*://; p; }" /proc/net/dev | tr -s '\t ' ' ' | \
{ while read line ; do echo $line | cut -d' ' -f1; echo $line | cut \
-d' ' -f9 ; done };

Oder so aehnlich...

> *Patsch* - Sys ...
> 
> /sys/class/net/eth0/statistics/tx_bytes
> /sys/class/net/eth0/statistics/rx_bytes
> 
Oder das...

> Flo (Der mal wieder sich selber jagt)
> 
Gruss
	Jan

-- 
You know hell has frozen over when the best golfer is black, the best
rapper is white, Apple is on x86 and MS is on PPC - and there's a new
Debian release.



More information about the Linux mailing list