pt-stalk ominous open_tables function

Bug #1307377 reported by MikeG
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

Currently the open_tables function logs to the TS-opentables files what appears to be an error message, rather than a warning:

open_tables() {
   local open_tables=$($CMD_MYSQLADMIN $EXT_ARGV ext | grep "Open_tables" | awk '{print $4}')
   if [ -n "$open_tables" -a $open_tables -le 1000 ]; then
      $CMD_MYSQL $EXT_ARGV -e 'SHOW OPEN TABLES' &
   else
      log "Too many open tables: $open_tables"
   fi
}

This would be less confusing if it had a log entry that was more verbose, such as the following:

      log "Logging disabled due to having over 1000 tables open. Number of tables currently open: $open_tables"

Tags: pt-stalk
tags: added: pt-stalk
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Checked with pt-stalk 2.2.10.

open_tables() {
   local open_tables=$($CMD_MYSQLADMIN $EXT_ARGV ext | grep "Open_tables" | awk '{print $4}')
   if [ -n "$open_tables" -a $open_tables -le 1000 ]; then
      $CMD_MYSQL $EXT_ARGV -e 'SHOW OPEN TABLES' &
   else
      log "Too many open tables: $open_tables"
   fi
}

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

This output is usually useless, because most setups have more than 1000 open tables and output contains only this error. Maybe we should start using P_S.TABLE_HANDLES table now and print all open descriptors?

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1218

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.