wow.. I never thought something so apparently simple could drive me to such madness
I have cacti up and running (for the mostpart) and it is fantastic.
I do have an issue with what should be the easiest thing to graph. Im trying to ping several hosts and graph the data.
Now, this DID seem to work then its like all the sudden it stops collecting data.
Here is an example of one not working :
/usr/bin/perl /usr/local/apache/htdocs/cacti/scripts/ping.pl covad.net
/usr/local/rrd/bin/rrdtool update /usr/local/apache/htdocs/cacti/rra/covadnet.rrd --template covadnet N:U
The things is, I have been checking over and over and once in a while I have seen the U change to a value. The scripts also run flawlessly from console. All the other graphs are happily collecting data. If I could get this ping beast conquered I would be a haaaaaaappy man..
OS = FreeBSD 4.7
PHP = 4.3.0
Cron entry - */5 * * * * cd /usr/local/apache/htdocs/cacti; /usr/local/bin/php /usr/local/apache/htdocs/cacti/cmd.php > /dev/null 2>&1
the cron works fine from the console as well.
Help?
ping.pl madness =D
Moderators: Developers, Moderators
hot damn fred you are good! I read your post and sat here thinking, "please, it cannot be that". I did it, tailed the log and let the cron run and blamo.
Anyone else having problems with the ping script, here is what I had to do on my system to get ping.pl to update when running as a cron :
Anyone else having problems with the ping script, here is what I had to do on my system to get ping.pl to update when running as a cron :
#!/usr/local/perl
$ping = `/sbin/ping -c 1 $ARGV[0] | /usr/bin/grep icmp_seq`;
$ping =~ s/(.*time=)(.*) (ms|usec)//;
print $2;
Not very... I still can't get the 0.8 CVS to install. It's starting to make me angry.techitch wrote:hot damn fred :) you are good!
But back on topic...
On my redhat and my mandrake systems, /etc/crontab has a number of lines at the beginning. I'll just quote my entire crontab for you to see it.
That PATH line might be important... As I've said, I don't know how this transfers to other systems like *BSD or Solaris./etc/crontab wrote: SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
Who is online
Users browsing this forum: No registered users and 2 guests