Graph when manualle run poller.php

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Jochke
Posts: 4
Joined: Fri Feb 10, 2006 1:59 am

Graph when manualle run poller.php

Post by Jochke »

Only when I manually run poller.php the graph is displaying results.

My /etc/crontab looks like this:

*/5 * * * * cacti /usr/local/bin/php /usr/hosting/www/sys.inetport.dk/cacti/poller.php > /dev/null 2>&1

I'm running FreeBSD.
User avatar
pgus
Cacti User
Posts: 55
Joined: Fri Feb 10, 2006 9:54 am

Re: Graph when manualle run poller.php

Post by pgus »

I have the same problem. Also tryed crontab -e. and put in */5 * * * * /srv/www/htdocs/cacti/poller.php > /dev/null >2&1. But no result.

Then I run poller.php cacti uppdates.

HELP Please
mefisto
Posts: 5
Joined: Fri Feb 10, 2006 9:56 am
Contact:

Post by mefisto »

Worked crontab

*/5 * * * *
cactiuser /usr/local/bin/php /usr/local/share/cacti/poller.php
> /dev/null 2>&1


This is single line
Jochke
Posts: 4
Joined: Fri Feb 10, 2006 1:59 am

Post by Jochke »

It don't work. Only if I manualle run "#php /usr/hosting/www/sys.inetport.dk/cacti/poller.php"

I've also restarted cron wirth "/etc/rc.d/cron restart"
mefisto
Posts: 5
Joined: Fri Feb 10, 2006 9:56 am
Contact:

Post by mefisto »

enter on server

whereis php

and paste path to php in crontab
exemple
/usr/bin/php
Jochke
Posts: 4
Joined: Fri Feb 10, 2006 1:59 am

Post by Jochke »

It also didn't work.

But I found a solution. If I run it as root It'll work.

*/5 * * * * root /usr/local/bin/php /usr/hosting/www/sys.inetport.dk/cacti/poller.php > /dev/null 2>&1
eaglebbs
Posts: 4
Joined: Sun Apr 17, 2005 4:03 am

Post by eaglebbs »

I still have the problem,

my crontab contain:
*/5 * * * * root /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

and that not update graph...

When i manually do
php /var/www/html/cacti/poller.php

all is done my graphs are updated...

My crontab daemon is launched...

I don't understand the problem...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try using

Code: Select all

*/5 * * * *     cactiuser       /usr/bin/php /var/www/html/cacti/poller.php > /var/www/html/cacti/poller.log 2>&1
(where your php path and your cacti install dir should be used, of course). So you'll always find the last poller output at log/poller.log to see rrdtool errors. When falling back to non-root user, make sure permissions on rra/ and log/ are set properly.
Reinhard
eaglebbs
Posts: 4
Joined: Sun Apr 17, 2005 4:03 am

Post by eaglebbs »

/bin/sh: root: command not found

is what contain my poll.log after lauching... I don't understand why it doesn't know why...
eaglebbs
Posts: 4
Joined: Sun Apr 17, 2005 4:03 am

Post by eaglebbs »

I've found a solution on Mandriva...

you must edit /etc/crontab better that to it accross crontab -e ...

Now my crontab is executed and all is done... At least :D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests