I believe the following should do this:
=== modified file 'lib/bash/collect.sh' --- lib/bash/collect.sh 2013-03-12 21:23:02 +0000 +++ lib/bash/collect.sh 2013-06-27 19:02:03 +0000 @@ -222,6 +222,10 @@ (echo $ts; netstat -antp) >> "$d/$p-netstat" & (echo $ts; netstat -s) >> "$d/$p-netstat_s" &
+ if [ -n "$($CMD_MYSQL $EXT_ARGV -e 'show slave status\G')" ]; then + (echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW SLAVE STATUS\G") \ + >> "$d/$p-slave-status" & + fi (echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \ >> "$d/$p-processlist" &
I believe the following should do this:
=== modified file 'lib/bash/ collect. sh'
--- lib/bash/collect.sh 2013-03-12 21:23:02 +0000
+++ lib/bash/collect.sh 2013-06-27 19:02:03 +0000
@@ -222,6 +222,10 @@
(echo $ts; netstat -antp) >> "$d/$p-netstat" &
(echo $ts; netstat -s) >> "$d/$p-netstat_s" &
+ if [ -n "$($CMD_MYSQL $EXT_ARGV -e 'show slave status\G')" ]; then slave-status" &
+ (echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW SLAVE STATUS\G") \
+ >> "$d/$p-
+ fi
(echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \
>> "$d/$p-processlist" &