[rrd-users] Script error

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


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-17-2005
Fabian Borot
 
Posts: n/a
Default [rrd-users] Script error



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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0