Spine/0.8.7b not picking up all output from script

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

Moderators: Developers, Moderators

Post Reply
nate450
Posts: 17
Joined: Mon Mar 13, 2006 1:45 pm
Location: Seattle, WA

Spine/0.8.7b not picking up all output from script

Post by nate450 »

I reported a similar issue with cactid in bug #960

I think it's related, but it's not identical. This script works fine with cmd.php but it does not work in spine.

Looking at bug #960 TheWitness says he is using BUFSIZE in spine to control the amount of output it will take, I adjusted this value in spine.h to 4096, and also to 10240, and recompiled but it didn't have any effect. I'm no C programmer so hoping someone can point out a value in spine I can adjust so it will work with this script. I used it for quite a while in cacti 0.8.6f with cmd.php. This new install I think is beyond cmd.php's ability to scale, so I need spine. It's collecting about 9.5 million data points a day at the moment(about double what I had cmd.php doing in 0.8.6).

Spine results:

Code: Select all

05/16/2008 05:41:05 PM - SPINE: Poller[0] Host[136] DS[381] SCRIPT: /usr/bin/perl /home/cacti/public_html/cacti-0.8.7b/scripts/mysql-extended-stats-innodb1.pl my_host_name, output: ADDITIONAL_MEM_POOL_SIZE:1048576 INNODB_BUFFER_POOL_SIZE:8388608 INNODB_LOG_BUFFER_SIZE:1048576 INNODB_LOG_FILE_SIZE:5242880
cmd.php results:

Code: Select all

05/16/2008 05:43:06 PM - CMDPHP: Poller[0] Host[136] DS[381] CMD: /usr/bin/perl /home/cacti/public_html/cacti-0.8.7b/scripts/mysql-extended-stats-innodb1.pl my_host_name, output: ADDITIONAL_MEM_POOL_SIZE:1048576 INNODB_BUFFER_POOL_SIZE:8388608 INNODB_LOG_BUFFER_SIZE:1048576 INNODB_LOG_FILE_SIZE:5242880 INNODB_BUFFER_POOL_PAGES_DATA:512 INNODB_BUFFER_POOL_PAGES_DIRTY:0 INNODB_BUFFER_POOL_PAGES_FLUSHED:49987505 INNODB_BUFFER_POOL_PAGES_MISC:0 INNODB_BUFFER_POOL_PAGES_TOTAL:512 INNODB_BUFFER_POOL_READ_AHEAD_RND:2362098 INNODB_BUFFER_POOL_READ_AHEAD_SEQ:59070111 INNODB_BUFFER_POOL_READ_REQUESTS:21189618600 INNODB_BUFFER_POOL_READS:71841189 INNODB_BUFFER_POOL_WRITE_REQUESTS:1670416756 INNODB_DATA_FSYNCS:49338723 INNODB_DATA_READ:17016243752960 INNODB_DATA_READS:135083044 INNODB_DATA_WRITES:92066577 INNODB_DATA_WRITTEN:1707378525184 INNODB_DBLWR_PAGES_WRITTEN:49987505 INNODB_DBLWR_WRITES:487759 INNODB_LOG_WAITS:2188 INNODB_LOG_WRITE_REQUESTS:102192239 INNODB_LOG_WRITES:48356253 INNODB_OS_LOG_FSYNCS:48363221 INNODB_OS_LOG_WRITTEN:69379876352 INNODB_PAGE_SIZE:16384 INNODB_PAGES_CREATED:1313774 INNODB_PAGES_READ:1038588993 INNODB_PAGES_WRITTEN:49987505 INNODB_ROW_LOCK_TIME:0
thanks

nate
nate450
Posts: 17
Joined: Mon Mar 13, 2006 1:45 pm
Location: Seattle, WA

update

Post by nate450 »

An update, I have another script that gathers a similarly large amount of data from my load balancer, and it works fine..

It returns ~690 characters while the mysql script returns ~1007 characters

Code: Select all

05/16/2008 05:37:07 PM - SPINE: Poller[0] Host[305] DS[349] SCRIPT: /usr/bin/perl /home/cacti/public_html/cacti-0.8.7b/scripts/bigip_stats.pl my_host_name
public, output: CPU_TEMP:40 CPU_FAN_RPM:6192 CHASSIS_TEMP:0 TCP_OPEN_CONN:0 TCP_CLOSE_WAIT_CONN:0 TCP_CLOSE_FINWAIT_CONN:0 TCP_CLOSE_TIMEWAIT_CONN:0 UDP_OPEN_CONN:0 CLIENT_CONN:7162 SERVER_CONN:7161 SSL_CLIENT_CONN:0 SSL_SERVER_CONN:0 MEM_USED:29236056 TOT_NEW_CLIENT_CONN:1363005748 NEW_CLIENT_ACCEPT:0 NEW_SERVER_CONNECT:0 TOT_NEW_SERVER_CONNECT:1350410108 TOT_SSL_CLIENT_NATIVE_CONN:0 TOT_SSL_CLIENT_COMPAT_CONN:0 TOT_SSL_SERVER_NATIVE_CONN:0 TOT_SSL_SERVER_COMPAT_CONN:0 CLIENT_BYTES_IN:465827790877 CLIENT_BYTES_OUT:1886053754316 SERVER_BYTES_IN:464992808128 SERVER_BYTES_OUT:1885608475296 HTTP_REQUEST:0 TOTAL_CPU:11840312252994973 IDLE_CPU:11686148573305372 SLEEP_CPU:0
nate450
Posts: 17
Joined: Mon Mar 13, 2006 1:45 pm
Location: Seattle, WA

update

Post by nate450 »

One more update, I have another mysql stats script that's behaving the same way(no surprise I guess)

Code: Select all

05/16/2008 06:26:09 PM - SPINE: Poller[0] Host[292] DS[378] SCRIPT: /usr/bin/perl /home/cacti/public_html/cacti-0.8.7b/scripts/mysql-extended-stats.pl my_host, output: QUERY_CACHE_SIZE:20971520
When running it on the console it looks like:

Code: Select all

[cacti@dc1-mon002:~/log]$ /usr/bin/perl /home/cacti/public_html/cacti-0.8.7b/scripts/mysql-extended-stats.pl my_host_name
QUERY_CACHE_SIZE:20971520 ABORTED_CLIENTS:24 BYTES_RECEIVED:2404466 BYTES_SENT:8415565 COM_CHANGE_DB:104 COM_COMMIT:0 COM_DELETE:0 COM_INSERT:0 COM_LOCK_TABLES:0 COM_SELECT:50 COM_UPDATE:0 CREATED_TMP_DISK_TABLES:189 CREATED_TMP_FILES:23 CREATED_TMP_TABLES:1084 HANDLER_DELETE:0 HANDLER_READ_FIRST:35 HANDLER_READ_KEY:9 HANDLER_READ_NEXT:4797388 HANDLER_READ_PREV:0 HANDLER_READ_RND:0 HANDLER_READ_RND_NEXT:868403311 HANDLER_UPDATE:1 HANDLER_WRITE:1275691286 QCACHE_FREE_MEMORY:20954088 QUESTIONS:1604 SELECT_RANGE:0 SELECT_SCAN:830 SLOW_QUERIES:15 SORT_RANGE:0 SORT_ROWS:0 SORT_SCAN:0 TABLE_LOCKS_IMMEDIATE:112 TABLE_LOCKS_WAITED:0 THREADS_CACHED:4 THREADS_CONNECTED:1 THREADS_RUNNING:1
688 characters, 36 values(which is more than the other one that outputs 31, not sure why this one does 36, I wrote these scripts a while ago)
nate450
Posts: 17
Joined: Mon Mar 13, 2006 1:45 pm
Location: Seattle, WA

Post by nate450 »

for now I think I'm just going to change these scripts that aren't working to update the RRD files directly and disable the data sources in cacti. Fortunately there's only a few systems that are affected.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests