pt-stalk should not call mysqladmin debug by default

Bug #1566939 reported by Valerii Kravchuk on 2016-04-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Undecided
Unassigned

Bug Description

mysqladmin debug output is NOT properly documented and is of limited use as a result (see https://bugs.mysql.com/bug.php?id=71346). On the other hand, we see that this call is used almost unconditionally in pt-stalk:

[openxs@centos git]$ grep -rn MYSQLADMIN `which pt-stalk`
780:CMD_MYSQLADMIN="${CMD_MYSQLADMIN:-"$(_which mysqladmin)"}"
830: $CMD_MYSQLADMIN $EXT_ARGV debug
894: $CMD_MYSQLADMIN $EXT_ARGV ext -i$OPT_SLEEP_COLLECT -c$cnt >>"$d/$p-mysqladmin" &
1011: local open_tables=$($CMD_MYSQLADMIN $EXT_ARGV ext | grep "Open_tables" | awk '{print $4}')
2132:=item CMD_MYSQLADMIN
[openxs@centos git]$

...
 824 local tail_error_log_pid=""
 825 if [ "$mysql_error_log" ]; then
 826 log "The MySQL error log seems to be $mysql_error_log"
 827 tail -f "$mysql_error_log" >"$d/$p-log_error" &
 828 tail_error_log_pid=$!
 829
 830 $CMD_MYSQLADMIN $EXT_ARGV debug
 831 else
 832 log "Could not find the MySQL error log"
 833 fi
 834
 835 if [ "${mysql_version}" '>' "5.1" ]; then
 836 local mutex="SHOW ENGINE INNODB MUTEX"
 837 else
 838 local mutex="SHOW MUTEX STATUS"
 839 fi
 840 innodb_status 1
 841 tokudb_status 1
...

The outputs of this command pollute error log and force users to ask why is it there when they had NOt explicitly asked for it, wonder is it an indication of a problem etc (imagine pt-stalk working as a daemon and collect9ing statistics periodically).

So, I suggest to disable this call by default and let user enable it if needed with a separate option.

Confirmed as feature request. Personally I never found the debug output useful on any pt-stalk.

Changed in percona-toolkit:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers