This is a discussion on [rrd-users] Script error within the RRD Users forums, part of the Networking and Network Related category; Hello I created a database and I am able to manually update it. Then I can fetch the values and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello 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 it: #!/bin/bash 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@cactitest rrdtool_test]# rrdtool fetch actv_in_calls.rrd AVERAGE --start 1116349686 --end 1116349943 active_in_calls 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 ? Regards Fabian -- Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/rrd-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi |
![]() |
| Thread Tools | |
| Display Modes | |
|
|