[rrd-users] Re: RRD Tutorial - Question -Real World Example
spiekey
spiekey at hotmail.com
Fri Mar 1 09:57:08 MET 2002
ok, i changed my script to that (still doesnt work):
#!/bin/sh
while (true)
do
BYTES_INPUT=` snmpwalk localhost public
interfaces.ifTable.ifEntry.ifInOctets.1 | awk -- ' BEGIN { FS = " " } {print
$2 } '`
BYTES_OUTPUT=` snmpwalk localhost public
interfaces.ifTable.ifEntry.ifOutOctets.1 | awk -- ' BEGIN { FS = " " }
print $2 } '`
DATE=`date +%s`
./rrdtool update localhost.rrd $DATE:$BYTES_INPUT:$BYTES_OUTPUT
echo $DATE - $BYTES_INPUT - $BYTES_OUTPUT
sleep 5
done
But when i execute it:
# ./test
1014972810 - = - =
./test: line 11: 21319 Segmentation fault ./rrdtool update
localhost.rrd $DATE:$BYTES_INPUT:$BYTES_OUTPUT
1014972816 - = - =
What did i do wrong?
Thanks, Spiekey
----- Original Message -----
From: Administrador <admin at alsernet.es>
To: spiekey <spiekey at hotmail.com>
Sent: Friday, March 01, 2002 9:29 AM
Subject: Re: [rrd-users] RRD Tutorial - Question -Real World Example
> Hola spiekey,
>
> Friday, March 01, 2002, 9:23:47 AM, escribió:
>
>
> s> Hello!
> s> i have SuSE73, and lo, eth0. I want to monitor my traffic.
> s> I tried to make such a "Real Worl example", the one in the tutorial.
> s> But i dont really know how to handle this:
>
> Here is my first script for that:
>
> #!/bin/sh
> while (true)
> do
> BYTES_ENTRADA=`snmpget -Ov localhost .1.3.6.1.2.1.2.2.1.10.2 | awk -- '
BEGIN { FS = " " } { print $2 } '`
> BYTES_SALIDA=`snmpget -Ov localhost .1.3.6.1.2.1.2.2.1.16.2 | awk -- '
BEGIN { FS = " " } { print $2 } '`
> FECHA=`date +%s`
>
> rrdtool update network.rrd $FECHA:$BYTES_ENTRADA:$BYTES_SALIDA
> echo $FECHA - $BYTES_ENTRADA - $BYTES_SALIDA
> sleep 1
> done
>
>
> And the translation from spanish to english :)
> ENTRADA -> INPUT
> SALIDA -> OUTPUT
> FECHA -> DATE
>
>
> --
> Administrador Técnico
> Alsernet 2000
> http://www.alsernet.es
>
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list