can't execute poller.php or cmd.php

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
31klev5
Posts: 26
Joined: Mon Apr 04, 2005 2:09 am
Location: Cherbourg

can't execute poller.php or cmd.php

Post by 31klev5 »

Hello all.

First, sorry for my english. Well, I'm in a training period and I have to make cacti run on a windows 2k computer. All is well installed as the cacti's documentation says, I can log to cacti via my webbrowser but when I want to access the graph it says :

Code: Select all

ERROR: opening 'c:/Pages_web/cacti/rra/cisco_2924_5min_cpu_8.rrd': No such file or directory
In fact no .rrd are built in the rra directory.
My cacti.log looks like :

Code: Select all

04/01/2005 09:10:30 AM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph -  --imgformat=PNG  --start=-86400  --end=-300  --title="2924 - CPU Usage"  --rigid  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label="percent"  DEF:a="c\:\pages_web\cacti/rra/cisco_2924_5min_cpu_8.rrd":5min_cpu:AVERAGE  AREA:a#FF0000:"CPU Usage"   GPRINT:a:LAST:"Current\:%8.0lf"   GPRINT:a:AVERAGE:"Average\:%8.0lf"   GPRINT:a:MAX:"Maximum\:%8.0lf" 
04/01/2005 09:10:31 AM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph -  --imgformat=PNG  --start=-86400  --end=-300  --title="2924 - CPU Usage"  --rigid  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label="percent"  DEF:a="c\:\pages_web\cacti/rra/cisco_2924_5min_cpu_8.rrd":5min_cpu:AVERAGE  AREA:a#FF0000:"CPU Usage"   GPRINT:a:LAST:"Current\:%8.0lf"   GPRINT:a:AVERAGE:"Average\:%8.0lf"   GPRINT:a:MAX:"Maximum\:%8.0lf" 
When i try to run poller.php via a window command i get (and that is the problem i think) :

Code: Select all

This script is only meant to run at the command line
The problem is that I use a command line!!!! It acts the same when I try to run cmd.php and i don't understand why.

Can you help me please, since last tuesday i can't do anything...

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) turn off Web Events logging.
2) clear your log file
3) turn on poller debugging for one cycle and run it (it, being poller.php).
4) What version of cacti, php, mysql, webserver, etc you running?
5) does typing: php -v at the commandline work?
31klev5
Posts: 26
Joined: Mon Apr 04, 2005 2:09 am
Location: Cherbourg

Post by 31klev5 »

1)done
2)done
3)how you do that?
4)cacti : 0.8.6c
php : 4.3.10-Win32
mysql server 4.1
apache 1.3.33
net-snmp 5.2.2-1
perl 5.8.6
rrdtool 1.0.49
5)yes il works
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please insure that you are running php.exe (cli) mode. If not, I did notice that there is a 'cli' directory inside of php. Move that php.exe file to the base directory. But first, back up that the fast cgi version first. I created a 'cgi' directory under php and copied it there. You can also change the value of "register_arg..." in the php.ini file to 'On' from 'Off'. Do these things and let me know if it had any affect.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
31klev5
Posts: 26
Joined: Mon Apr 04, 2005 2:09 am
Location: Cherbourg

Post by 31klev5 »

Thank you for these informations. I didn't use the php(cli).exe, if i try with the php(cli).exe in cli directory it works in the run command but it writes "Waiting on 4/4 pollers" without stopping anymore. Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
Waiting on 4/4 pollers.
...
31klev5
Posts: 26
Joined: Mon Apr 04, 2005 2:09 am
Location: Cherbourg

Post by 31klev5 »

It now works. But when the task scheduler executes for the first time poller.php, no .rrd is created. I have to run on my own the cmd.php in the run window. is it normal?
Once that done it works properly, but how can i make the window executing the poller.php every 5 minutes not appear on screen.? Can I make it run as a deamon?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) it takes 2 polling cycles for a rrd file to be created
2) To hide the cmd window that opens up, either run it as a different user than the one logged on OR run a vbs script that will hide the window opening.
31klev5
Posts: 26
Joined: Mon Apr 04, 2005 2:09 am
Location: Cherbourg

Post by 31klev5 »

when the poller.php is executed twice (or more), no .rrd is made. I really don't understand why I have to run cmd.php manually... Moreover once i have my .rrd my graphs are no longer updated. Cacti is a strange world for me...
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

31klev5,

With respect to
Once that done it works properly, but how can i make the window executing the poller.php every 5 minutes not appear on screen.? Can I make it run as a deamon?
You need to perform the following steps:

1) Create a UserID in Windows with Admin Rights (Best)
2) Disable that UserID's ability to TS into the box (aka restrict it)
3) Set an unexpiring password for the UserID (This is a service id after all)
4) Create a scheduled task for poller.php and assign it to run under this new UserID

You should resolve the issue with the poller not working though if that is actually the case.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests