pt-stalk should capture show slave status
Bug #1194874 reported by
Fernando Ipar
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Invalid
|
Undecided
|
Unassigned |
Bug Description
This is a feature request.
pt-stalk should capture the output to 'show slave status\G' when collect is triggered, if running on a replication slave.
To post a comment you must log in.
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" &