mrtg und gigabit

Florian Lohoff flo at rfc822.org
Tue Jun 7 21:28:51 CEST 2005


On Tue, Jun 07, 2005 at 09:03:17PM +0200, Florian Lohoff wrote:
> On Tue, Jun 07, 2005 at 08:59:12PM +0200, Uwe Schuerkamp wrote:
> > hast du's mal mit den Werten probiert, die ifconfig oder netstat -i
> > ausspucken? Vielleicht hilft's ja in diesem Fall, Pakete und nicht
> > Bytes zu zählen?
> 
> Ich popel gerade mit sed in /proc/net/dev rum ;)

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*

*Patsch* - Sys ...

/sys/class/net/eth0/statistics/tx_bytes
/sys/class/net/eth0/statistics/rx_bytes

Flo (Der mal wieder sich selber jagt)
-- 
Florian Lohoff                  flo at rfc822.org             +49-171-2280134
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lug-owl.de/pipermail/linux/attachments/20050607/285d0399/attachment.sig>


More information about the Linux mailing list