[rrd-users] Re: Help using rrdtool update

Tobias Oetiker oetiker at ee.ethz.ch
Wed Oct 20 21:43:33 MEST 1999


Today you sent me mail regarding [rrd-users] Re: Help using rrdtool update:

*> > I'm trying a very basic script to be run with cron to pump two values
*> > into a database (ifinoctets and ifoutoctets) - basically following the
*> > tutorial. Unfortunately, RRDTOOL is coredumping when I run this script..
*> > I wondered if anyone could take a look at it and suggest where I'm
*> > screwing up...?
*> > 
*> 
*> Core dump is not good in any case. If the input is wrong, it should
*> complain.
*> 
*> > Script :
*> > 
*> > #!/bin/ksh
*> > rrdarray[0]="`snmpget -v1 $1 $2 2.2.1.10.1 | awk '{print $3}'`"
*> > rrdarray[1]="`snmpget -v1 $1 $2 2.2.1.16.1 | awk '{print $3}'`"
*> > /apps/RRD/bin/rrdtool update /apps/RRD/mycsx.rrd N:`echo
*> > ${rrdarray[0]}`:`echo ${rrdarray[1]}`
*> > 
*> 
*> Two things:
*> 1) make it more simple.
*> 2) Try debugging
*> 
*> How?
*> 
*> 1) Alter your scipt:
*> #!/bin/ksh
*> in="`snmpget -v1 $1 $2 2.2.1.10.1 | awk '{print $3}'`"
*> out="`snmpget -v1 $1 $2 2.2.1.16.1 | awk '{print $3}'`"
*> /apps/RRD/bin/rrdtool update /apps/RRD/mycsx.rrd N:$in:$out
*> 
*> 2) Change "/apps/RRD/bin/rrdtool" into "echo" and inspect its output.
*> 
*> You may have spaces in the output of snmpget. Because of the quotes
*> these won't get removed. This may upset rrdtool.

if you manage to get a core with a simple commandline I would be most
interesting in knowing what commandline this is ...

cheers
tobi
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list