[rrd-users] Re: A very simple rrd graph code (ping)

Matej Zerovnik - LeVaK levak at planetq.org
Wed Jun 5 15:54:14 MEST 2002


On Wednesday 05 June 2002 05:46, you wrote:
> ggest a very simple graph code or utility that graphs other
> host

for ping time:
#!/bin/bash
ping -n -c 3 -q HOST |grep avg |cut -d= -f2  |awk -F"/" '{print $2}' | sed -e 
's/ms//'

and for ping loss:
#!/bin/bash
ping -c 5 HOST | tail -2 | head -1 | awk '{ print $7 "\n" $7 }' | sed 's/%//'

The scripts only gives a number.. You have to enter them into rrd archive with 
rrdtool update... On www.rrdtool.org read how to create a rrd archive

For graps use rrdtools create image.png DEF:ds0=ping.rrd:AVERAGE 
AREA:ds0#000000 and you should get a graph...:)

LeVaK

--
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