Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1340

LP #1566939: pt-stalk should not call mysqladmin debug by default


    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.13
    • Component/s: None
    • Labels:


      **Reported in Launchpad by Valerii Kravchuk last update 06-04-2016 16:17:22

      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=$!
      830 $CMD_MYSQLADMIN $EXT_ARGV debug
      831 else
      832 log "Could not find the MySQL error log"
      833 fi
      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.

        Smart Checklist




              • Assignee:
                carlos.salguero Carlos Salguero
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: