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

ss_get_by_ssh.php won't work for memcached #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. /usr/bin/php -q /sitedata/cacti/site/scripts/ss_get_by_ssh.php --host
127.0.0.1 --type memcached --items bd,be,bf --server

What is the expected output? 
 bd:9750368 be:4041108 bf:755615

What do you see instead?
 nothing. the script is hanged

What version of the product are you using?
 version 1.1.2 

On what operating system?
 Description:   Ubuntu 8.04.2
 2.6.24-19-server x86_64

Please provide any additional information below.
 - Bug fixed by using netcat's -w option  (-w 1 on line 606)

Original issue reported on code.google.com by ase...@gmail.com on 24 Jun 2009 at 11:34

GoogleCodeExporter commented 9 years ago
This is probably an SSH key problem.  See issue 68.

Original comment by baron.schwartz on 24 Oct 2009 at 1:27

GoogleCodeExporter commented 9 years ago
When run locally, 'echo stats | nc host 11211' hangs because the connection to
memcached is not closed. Suggested fix is to change line 606 to
$cmd = "$cmd 'echo \"stats\nquit\" | nc $srv $prt'";

Original comment by b.goris...@gmail.com on 4 Dec 2009 at 11:31

GoogleCodeExporter commented 9 years ago
Thanks.  Have you confirmed that this will fix it?

Original comment by baron.schwartz on 5 Dec 2009 at 12:32

GoogleCodeExporter commented 9 years ago
Hm, I see now that the original reporter suggested the -w option to netcat, 
which I
missed before.

Original comment by baron.schwartz on 5 Dec 2009 at 12:33

GoogleCodeExporter commented 9 years ago
Both suggestions fix the issue, but quit is faster (and neater imho).

Original comment by b.goris...@gmail.com on 5 Dec 2009 at 12:46

GoogleCodeExporter commented 9 years ago
Tested and fixed in r338.

Original comment by baron.schwartz on 13 Dec 2009 at 5:16