CMD not valid. Partial Result:

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

Moderators: Developers, Moderators

BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

Post by BelgianViking »

I hope to get more info on this problem by adding some extre 'debug' output in the CMD.PHP script.
I added some log entries in this part:

case POLLER_ACTION_SCRIPT: /* script (popen) */
$output = trim(exec_poll($item["arg1"]));

/* added to debug */
cacti_log("item=$item");
cacti_log("exec_poll argument=" . $item["arg1"]);
cacti_log("before strip quotes, output=$output");

/* remove any quotes from string */
$output = strip_quotes($output);

/* added to debug */
cacti_log("after strip quotes, output=$output");

It generated the following logging:
06/14/2005 09:08:17 AM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] item=Array
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] exec_poll argument=c:\Inetpub\wwwroot\cacti\random.php
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] before strip quotes, output=
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] after strip quotes, output=
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] Host[0] WARNING: Result from CMD not valid. Partial Result:
06/14/2005 09:08:18 AM - CMDPHP: Poller[0] Host[0] CMD: c:\Inetpub\wwwroot\cacti\random.php, output: U
06/14/2005 09:08:18 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting

It seems to me that there is simply no output from the random.php script being read... But I'll leave the interpretation to experts.
Can someone help me to dig further in this ?
Thanks !
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

Post by BelgianViking »

Digging further into CMD.PHP and POLLER.PHP;

it seems that
the following statement in CMD.PHP
$output = trim(exec_poll($item["arg1"]));

is empty because
exec_poll($item["arg1"]) is executed as exec_poll(c:\Inetpub\wwwroot\cacti\random.php) and that result is empty.

I debugged this by writing the argument and variables to the log:
06/14/2005 12:51:49 PM - CMDPHP: Poller[0] exec_poll argument=c:\Inetpub\wwwroot\cacti\random.php
execpolloutput=

Can anybody help me on this one ?
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest