google-code-export / mysql-cacti-templates

Automatically exported from code.google.com/p/mysql-cacti-templates
GNU General Public License v2.0
1 stars 0 forks source link

WARNING: Result from CMD not valid #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Existing 1.1.2 installation
2. Delete all existing devices including graph templates and data sources
2. Upgrade to 1.1.4 by copying ss_get_*.php scripts and importing new XML
templates.
3. Setup hosts using MySQL & Apache templates

What is the expected output? What do you see instead?

I had no issues when running 1.1.2.

I now get several lines like so in my cacti.log:

11/09/2009 02:50:04 PM - CMDPHP: Poller[0] Host[11] DS[210] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:50:18 PM - CMDPHP: Poller[0] Host[12] DS[244] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:50:37 PM - CMDPHP: Poller[0] Host[13] DS[280] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:50:47 PM - CMDPHP: Poller[0] Host[14] DS[299] WARNING: Result
from CMD not valid.  Partial Result: Array
11/09/2009 02:50:51 PM - SYSTEM STATS: Time:49.6216 Method:cmd.php
Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:145
RRDsProcessed:145
11/09/2009 02:55:04 PM - CMDPHP: Poller[0] Host[11] DS[209] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:55:24 PM - CMDPHP: Poller[0] Host[12] DS[245] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:55:34 PM - CMDPHP: Poller[0] Host[13] DS[280] WARNING: Result
from CMD not valid.  Partial Result: 
11/09/2009 02:55:44 PM - CMDPHP: Poller[0] Host[14] DS[299] WARNING: Result
from CMD not valid.  Partial Result: Array
11/09/2009 02:55:48 PM - SYSTEM STATS: Time:46.7255 Method:cmd.php
Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:150
RRDsProcessed:150

What version of the product are you using? On what operating system?

Cacti: 0.8.7b
Templates: 1.1.4
Gentoo: 2.6.29-gentoo-r5

Original issue reported on code.google.com by hobod...@me.com on 9 Nov 2009 at 9:03

GoogleCodeExporter commented 9 years ago
The best way to see what's happening is to increase the log verbosity to log
everything, wait a polling cycle, and then see if you can get more information 
from
the log.

Original comment by baron.schwartz on 10 Nov 2009 at 2:30

GoogleCodeExporter commented 9 years ago
I figured that was the case, just didn't want to provide a wall of log up front.

I've attached the full log file from a polling cycle.

Here is a much trimmed version showing what I *think* are the relevant lines:

https://gist.github.com/4c2f7211761138af1736

Original comment by hobod...@me.com on 10 Nov 2009 at 5:37

Attachments:

GoogleCodeExporter commented 9 years ago
This is definitely relevant:

11/10/2009 10:40:21 AM - CMDPHP: Poller[0] Host[12] DS[244] CMD: /usr/bin/php -q
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php --host
molybdenum.viasant.com --items cm,cn,co --user --pass --port , output: U

What do you get when you run the following command manually from the 
command-line?

/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php 
--host
molybdenum.viasant.com --items cm,cn,co --user --pass --port 

If you don't get anything useful, check if $debug is true in the script.  Set 
it to
true and run again.  Do you get anything?

Original comment by baron.schwartz on 19 Nov 2009 at 2:41

GoogleCodeExporter commented 9 years ago
I get:

cm:28271729 cn:969649 co:5463

Original comment by hobod...@me.com on 19 Nov 2009 at 2:45

GoogleCodeExporter commented 9 years ago
Hm, can you try with --nocache?

Original comment by baron.schwartz on 19 Nov 2009 at 2:57

GoogleCodeExporter commented 9 years ago

PHP Notice:  Undefined offset:  0 in 
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php on line 
361
PHP Stack trace:
PHP   1. {main}() 
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php:0
PHP   2. ss_get_mysql_stats() 
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php:106

Notice: Undefined offset:  0 in 
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php on line 361

Call Stack:
    0.0064     326304   1. {main}() /var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php:0
    0.0072     371680   2. ss_get_mysql_stats() 
/var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php:106

Dump $_SERVER
Dump $_GET
Dump $_POST
Dump $_COOKIE
Dump $_FILES
Dump $_ENV
Dump $_SESSION
Dump $_REQUEST
Array
(
    [0] => Array
        (
            [file] => /var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php
            [line] => 842
            [function] => to_int
            [args] => Array
                (
                    [0] => has
                )

        )

    [1] => Array
        (
            [file] => /var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php
            [line] => 423
            [function] => get_innodb_array
            [args] => Array
                (
                    [0] => 
=====================================
091118 19:15:28 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 54 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 40465, signal count 40382
Mutex spin waits 0, rounds 759694, OS waits 4922
RW-shared spins 88751, OS waits 34310; RW-excl spins 90975, OS waits 224
------------
TRANSACTIONS
------------
Trx id counter 0 1436843
Purge done for trx's n:o < 0 1436795 undo n:o < 0 0
History list length 18
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 28430, OS thread id 2102840208
MySQL thread id 11825578, query id 889819555 63.149.16.4 cacti
SHOW /*!50000 ENGINE*/ INNODB STATUS
---TRANSACTION 0 1436839, not started, process no 28430, OS thread id 2139405200
MySQL thread id 16, query id 889818673 Has read all relay log; waiting for the 
slave I/O thread to update it
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
10998 OS file reads, 318481 OS file writes, 190120 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.52 writes/s, 0.26 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
0 inserts, 0 merged recs, 0 merges
Hash table size 1593833, node heap has 34 buffer(s)
2.11 hash searches/s, 0.04 non-hash searches/s
---
LOG
---
Log sequence number 0 3060990333
Log flushed up to   0 3060990333
Last checkpoint at  0 3060990333
0 pending log writes, 0 pending chkp writes
116037 log i/o's done, 0.19 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 463494158; in additional pool allocated 4287872
Dictionary memory allocated 1532568
Buffer pool size   24576
Free buffers       1
Database pages     24541
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 11302, created 21305, written 219130
0.00 reads/s, 0.00 creates/s, 0.30 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 28430, id 2133736336, state: sleeping
Number of rows inserted 2883523, updated 6786, deleted 65867, read 104076982
0.07 inserts/s, 0.00 updates/s, 0.00 deletes/s, 2.19 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

                )

        )

    [2] => Array
        (
            [file] => /var/www/localhost/htdocs/cacti/scripts/ss_get_mysql_stats.php
            [line] => 106
            [function] => ss_get_mysql_stats
            [args] => Array
                (
                    [0] => Array
                        (
                            [host] => molybdenum.viasant.com
                            [items] => cm,cn,co
                            [nocache] => 1
                        )

                )

        )

)
cm:28276052 cn:969676 co:5463

Original comment by hobod...@me.com on 19 Nov 2009 at 3:15

GoogleCodeExporter commented 9 years ago
Pay dirt.  OK, thanks.  I think I can find and solve the problem from this.

Original comment by baron.schwartz on 19 Nov 2009 at 3:30

GoogleCodeExporter commented 9 years ago
The workaround for right now is to set $debug=false in the script header, by 
the way.

Original comment by baron.schwartz on 19 Nov 2009 at 3:31

GoogleCodeExporter commented 9 years ago
This is actually fixed in SVN.  It's the same issue as issue 83.  Thanks!

Original comment by baron.schwartz on 19 Nov 2009 at 3:53