i'm trying to use the "additionnal script" sql_stat.php on my linux server
but i have a strange behaviour which i can't sort out....
if i launch cmd.php by hand, i get the following output which is correct
but when cmd.php is launched through cron, this is an other story...Manual output for cmd.php
bash-2.05$ ./cmd.php
[...]
command: php -q /home/www/cacti/scripts/sql_stat.php Slow_queries, output: 4990
command: php -q /home/www/cacti/scripts/sql_stat.php Questions, output: 26767547
[...]
update /home/www/cacti/rra/localhost_mysql_slow_queries_8.rrd --template mysql_slow_queries N:4990
update /home/www/cacti/rra/localhost_mysql_queries_9.rrd --template mysql_queries N:26767547
time: 0
bash-2.05$
here is what i get in rrd.log (including the log from the above cmd.php)
how come it works perfectly when run manually, whereas i get an "U" everytime it runs through cronrrd.log output
(by cron below)
08/02/2004 8:05 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_slow_queries_8.rrd --template mysql_slow_queries N:U
08/02/2004 8:05 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_queries_9.rrd --template mysql_queries N:U
[...]
(by manual cmd.php below)
08/02/2004 8:06 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_slow_queries_8.rrd --template mysql_slow_queries N:4990
08/02/2004 8:06 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_queries_9.rrd --template mysql_queries N:26767547
[...]
(again by cron below, and so on....)
08/02/2004 8:10 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_slow_queries_8.rrd --template mysql_slow_queries N:U
08/02/2004 8:10 PM - CMD: /usr/local/bin/rrdtool update /home/www/cacti/rra/localhost_mysql_queries_9.rrd --template mysql_queries N:U
note : the cron entry belongs to the same user who ran the cmd.php manually
Anybody has an idea for me ?
thanks for the help
PP