[rrd-users] Script error

Fabian Borot fborot at hotmail.com
Tue May 17 20:14:29 MEST 2005


I created a database and I am able to manually update it. Then I can fetch 
the values and graph. Perfect. Manually is working fine.

But now I am trying to update the database using a bash script and all I get 
is "nan". I am kind of new to bash scripting so I may have an error. This is 

in_act_calls=$(snmpget -v1 -c <string> <ip_address> <OID> | cut -d: -f4)
echo "rrdtool update actv_in_calls.rrd N:$in_act_calls"

Below is what I get when trying to fetch:

[root at cactitest rrdtool_test]# rrdtool fetch actv_in_calls.rrd AVERAGE 
--start 1116349686 --end 1116349943

1116349680: nan
1116349740: nan
1116349800: nan
1116349860: nan
1116349920: nan
1116349980: nan

This is my crontab file:
*/1 * * * * bash /var/www/html/rrdtool_test/script1.in_act_calls.sh  > 
/dev/null 2>&1

and every minute I see this is the cron log: (hre I pasted the last one)

May 17 14:17:01 cactitest crond[6467]: (root) CMD (bash 
/var/www/html/rrdtool_test/script1.in_act_calls.sh  > /dev/null 2>&1)

I suspect that I am not handling the variable the right way but I havent 
been able to spot the error.
Can somebody tell me what is wrong with the script ?


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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list