[rrd-users] rrdtool graph don't show values
Didier Benza
Didier.Benza at sophia.inria.fr
Wed Mar 16 08:59:46 MET 2005
Hello,
I am new to rrdtool and I tried to create, update and graph a database
as an exercice. I created a database to store RX and TX values resulting
of the netstat --interface=xxx command on a linux box.
The command I used to create the database was :
rrdtool create netstat.rrd \
--step 300 \
DS:rx:COUNTER:400:0:U \
DS:tx:COUNTER:400:0:U \
RRA:AVERAGE:0.5:1:2304 \
RRA:AVERAGE:0.5:6:2160 \
RRA:AVERAGE:0.5:24:6480 \
RRA:MIN:0.5:6:2160 \
RRA:MIN:0.5:24:6480 \
RRA:MAX:0.5:6:2160 \
RRA:MAX:0.5:24:6480
The idea was to keep average data points for 5 minutes (8 days), for 30
minutes (45 days) and for 2 hours (540 days). I did'nt want to keep min
and max values for 5 minutes. I also wrote the following very simple
script :
#!/bin/csh
while (1)
set ligne = (`netstat --interface=eth0 |& grep ^eth0`)
set Rx = $ligne[4]
set Tx = $ligne[8]
rrdtool update netstat.rrd N:"$Rx":"$Tx"
sleep 300
end
which updates the database every 5 minutes.
Everything works fine, the script is active since yesterday and I can
see with rrdtool fetch or rrdtool dump that the data in the database as
correct values (as far as I can tell) and time stamps.
But I don't understand why using this command to generate a picture to
see the evolution for the last 2 hours :
rrdtool graph netstat.png \
-s -7200 \
-w 1024 \
-h 800 \
-a PNG \
"DEF:TX=netstat.rrd:tx:AVERAGE" \
"DEF:RX=netstat.rrd:rx:AVERAGE" \
"LINE3:TX:#FF0000:Transmit" \
"LINE3:RX:#0000FF:Receive"
I obtain a flat graph. the axis seems correct, the Y-axis is labeled up
to 5.0K and the maximum MAX value recorded is 4.2840601064e+03, so it is
fine. But there is nothing else than the grid and the labeled axis, no
curve.
What is my mistake ?
--
Didier Benza Didier.Benza at sophia.inria.fr
Tel : +33 492 38 7167 / Fax : +33 492 38 7602
INRIA 2004, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex
-- Attached file removed by Ecartis and put at URL below --
-- Type: application/x-pkcs7-signature
-- Desc: S/MIME Cryptographic Signature
-- Size: 3k (3214 bytes)
-- URL : http://www.ee.ethz.ch/~slist/p/4237F03F14266-smime.p7s
--
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