Poller.php doesn't create a rrd files

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jnc_neo
Posts: 1
Joined: Tue Dec 23, 2008 10:41 am

Poller.php doesn't create a rrd files

Post by jnc_neo »

I've installed a cacti as it is written here then i've made a device and few data sources. But now rrd files for data sources doesn't create. I tryed to start poller.php manual. It returns:

Code: Select all

user@user-desktop:~$ sudo /opt/lampp/bin/php -q  /opt/lampp/htdocs/cacti/poller.php
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:1.11
12/23/2008 06:09:52 PM - SYSTEM STATS: Time:2.2622 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:3 RRDsProcessed:3
Here is a rra directory:

Code: Select all

user@user-desktop:~$ ls -l /opt/lampp/htdocs/cacti/rra
total 192
-rwxrwxrwx 1 root root 47840 2008-12-23 18:09 localhost_mem_buffers_10.rrd
-rwxrwxrwx 1 root root 47840 2008-12-23 18:09 localhost_mem_swap_11.rrd
-rwxrwxrwx 1 root root 47840 2008-12-23 18:09 localhost_proc_12.rrd
-rwxrwxrwx 1 root root 47840 2008-12-23 16:29 localhost_snmp_oid_14.rrd
So, there are all permitions on the files and directory.
Have anyone any ideas how to solve it?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The three default rrds seem to be updated. What did you add? What do you expect to show up?
Reinhard
Choom
Posts: 2
Joined: Sat Jan 03, 2009 12:54 pm

Post by Choom »

I've installed a cacti 0.87b. But rrd files for data sources doesn't create.

/usr/local/bin/php /usr/local/share/cacti/poller.php:

Code: Select all

Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:0
cacti.log:

Code: Select all

01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item where rrd_next_step<=0" 
01/03/2009 10:18:47 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '1488711', Max Runtime '298', Poller Runs: '1' 
01/03/2009 10:18:47 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 1488711 seconds have passed since the last poll! 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('poller_lastrun',1231003127)" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/usr/local/share/cacti')" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "TRUNCATE TABLE poller_time" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT local_data_id, rrd_name FROM poller_output" 
01/03/2009 10:18:47 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/bin/php, ARGS: -q /usr/local/share/cacti/cmd.php 0 1] 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] ERROR: Invalid Number of Arguments.  You must specify 0 or 2 arguments. 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select  poller_output.output,  poller_output.time,  poller_output.local_data_id,  poller_item.rrd_path,  poller_item.rrd_name,  poller_item.rrd_num  from (poller_output,poller_item)  where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)  " 
01/03/2009 10:18:47 PM - SYSTEM STATS: Time:0.2203 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:0 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:0.2203 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:0')" 
01/03/2009 10:18:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
I can't understand what is "CMDPHP: Poller[0] ERROR: Invalid Number of Arguments. You must specify 0 or 2 arguments." ?????

Tryed: php-5.2.6 and 5.2.8 (safemode on/off), rrdtool-1.2.26 and 1.3.3.
Choom
Posts: 2
Joined: Sat Jan 03, 2009 12:54 pm

Wow ! It works :)

Post by Choom »

I 've modify cmd.php :D

now the log is:

Code: Select all

01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argc]=6
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][0]=/usr/local/share/cacti/cmd.php
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][1]=0
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][2]=1
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][3]=>
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][4]=/dev/null
01/05/2009 03:28:21 PM - CMDPHP: Poller[0] SERVER[argv][5]=&
Modification after line N95:

Code: Select all

///// PHP SAFEMODE test --start
	/*
	 cacti_log("SERVER[argc]=".$_SERVER["argc"]."\n",true);
	 for ($Srvii=0; $Srvii<$_SERVER["argc"]; $Srvii++){
	 	cacti_log("SERVER[argv][".$Srvii."]=".$_SERVER["argv"][$Srvii],true);
	 }
	 cacti_log("\n",true);
	*/

	if(($_SERVER["argc"]>3) && ini_get('safe_mode') && $_SERVER["argv"][3]==">" && $_SERVER["argv"][4]=="/dev/null"){
		$PHP_SAFEMODE_ARGS_OK = true;
		cacti_log("DEBUG: PHP SafeMode is ON. There are too much arguments. Try to continue...", false);
	}
	else {$PHP_SAFEMODE_ARGS_OK = false;}
	///// PHP SAFEMODE test --finish

	if ($_SERVER["argc"] == "3" || $PHP_SAFEMODE_ARGS_OK == true) {

..........
...........

}
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests