manually script works, but only one variable be on the graph

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
uho
Posts: 1
Joined: Thu Apr 28, 2005 5:53 am

manually script works, but only one variable be on the graph

Post by uho »

hello

My script:

Code: Select all

#!/usr/bin/perl
$_ = `/usr/bin/nc localhost 7634`;
@tab = split(/\|/);
print "hde:$tab[3] hdg:$tab[8]";
result:

Code: Select all

# ./hddtemp.pl
hde:35 hdg:38
cacti log:

Code: Select all

04/28/2005 01:00:02 PM - CACTID: Poller[0] Host[1] SCRIPT: perl /usr/share/webapps/cacti-0.8.6d/scripts/hddtemp.pl, output: hde:35 hdg:38
graph properties:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="HDD Temp" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
DEF:a="/usr/share/webapps/cacti-0.8.6d/rra/localhost_hdg_26.rrd":hde:AVERAGE \
DEF:b="/usr/share/webapps/cacti-0.8.6d/rra/localhost_hdg_26.rrd":hdg:AVERAGE \
LINE2:a#FF0000:"Samsung - /dev/hde"  \
GPRINT:a:LAST:"%8.2lf %s\n"  \
LINE2:b#35962B:"Seagate - /dev/hdg"  \
GPRINT:b:LAST:"%8.2lf %s\n" 
graph show only hdg variable, and I don't understand why?
variable hde have "nan" value!
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests