[rrd-users] Update Problem (weird)

*Joe* joe at tormented.org
Sun Apr 21 19:38:36 MEST 2002

Ok. I made a perl script that updates and graphs my rrd. It works fine,
EXCEPT when I run it with crond. I view my cron logs and it executes the
perl script fine without errors. After being executed by crond I have no
updates to my rrd, but only an updated graph with no lines. First,
here's my perl script.
use strict;
my $dc1in = `snmpwalk localhost joe16`;
$dc1in = qx{ snmpwalk localhost joe16 };
my ($dc1inresult) = ( split ' ', $dc1in )[3];
my $dc1out = `snmpwalk localhost joe16`;
$dc1out = qx{ snmpwalk localhost joe16 };
my ($dc1outresult) = ( split ' ', $dc1out )[3];
system "/usr/local/rrdtool/bin/rrdupdate
system '/usr/local/rrdtool/bin/rrdtool graph
/usr/local/apache/htdocs/rrd/dc1inout.gif --title="DC1 (External)
Throughput" --start -86400
--vertical-label kb/sec
LINE1:download#009933:"Download" AREA:upload#0000FF:"Upload"';
Here's my cronlog just to show it does run, (as root)
Apr 21 12:20:00 tormented /USR/SBIN/CRON[69207]: (root) CMD
And here's my crond line in /etc/crontab:
*/5     *       *       *       *       root
/usr/local/apache/htdocs/rrd/script.pl > /dev/null &
While I'm downloading or uploading, I run the script using the shell
[root at eclipse :/usr/local/apache/htdocs/rrd] ./script.pl
And I get a perfectly working graph with lines and all that good stuff.
Does anyone know what could be the problem? I know it's probably
something stupid, but I'd greatly appreciate it for a feedback that
would help.

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

More information about the rrd-users mailing list