~percona-toolkit-dev/percona-toolkit/fix-1015590-pt-mysql-summary-percona-server-5.5

« back to all changes in this revision

Viewing changes to bin/pt-mysql-summary

  • Committer: Brian Fraser
  • Date: 2012-11-02 03:21:48 UTC
  • Revision ID: brian.fraser@percona.com-20121102032148-7kj28hr68zdzmsxx
Fix for 1015590: pt-mysql-summary not Percona Server 5.5-ready

Show diffs side-by-side

added added

removed removed

Lines of Context:
1004
1004
   local varname="$2"
1005
1005
   [ -e "$file" ] || return
1006
1006
 
1007
 
   if [ "$( get_var "$varname" "${file}" )" ]; then
 
1007
   if [ "$( grep "$varname" "${file}" )" ]; then
1008
1008
      local var="$(awk "\$1 ~ /^$2$/ { print \$2 }" $file)"
1009
1009
      if [ "${var}" = "ON" ]; then
1010
1010
         echo "Enabled"
1011
1011
      elif [ "${var}" = "OFF" -o "${var}" = "0" -o -z "${var}" ]; then
1012
1012
         echo "Disabled"
1013
 
      elif [ "$3" = "ne" ]; then
 
1013
      elif [ "${3:-""}" = "ne" ]; then
1014
1014
         if [ "${var}" != "$4" ]; then
1015
1015
            echo "Enabled"
1016
1016
         else
1017
1017
            echo "Disabled"
1018
1018
         fi
1019
 
      elif [ "$3" = "gt" ]; then
 
1019
      elif [ "${3:-""}" = "gt" ]; then
1020
1020
         if [ "${var}" -gt "$4" ]; then
1021
1021
            echo "Enabled"
1022
1022
         else
1741
1741
 
1742
1742
   [ -e "$file" ] || return
1743
1743
 
1744
 
   name_val "Table & Index Stats"   \
1745
 
            "$(feat_on "$file" userstat_running)"
 
1744
   local userstat="$(feat_on "$file" userstat_running)"
 
1745
   if [ "${userstat:-""}" = "Not Supported" ]; then
 
1746
      userstat="$(feat_on "$file" userstat)"
 
1747
   fi
 
1748
   name_val "Table & Index Stats" "$userstat"
 
1749
   
1746
1750
   name_val "Multiple I/O Threads"  \
1747
1751
            "$(feat_on "$file" innodb_read_io_threads gt 1)"
1748
 
   name_val "Corruption Resilient"  \
1749
 
            "$(feat_on "$file" innodb_pass_corrupt_table)"
1750
 
   name_val "Durable Replication"   \
1751
 
            "$(feat_on "$file" innodb_overwrite_relay_log_info)"
1752
 
   name_val "Import InnoDB Tables"  \
1753
 
            "$(feat_on "$file" innodb_expand_import)"
1754
 
   name_val "Fast Server Restarts"  \
1755
 
            "$(feat_on "$file" innodb_auto_lru_dump)"
 
1752
 
 
1753
   local corrupt_res="$(feat_on "$file" innodb_pass_corrupt_table)"
 
1754
   if [ "${corrupt_res:-""}" = "Not Supported" ]; then
 
1755
      corrupt_res="$(feat_on "$file" innodb_corrupt_table_action)"
 
1756
   fi
 
1757
   name_val "Corruption Resilient" "$corrupt_res"
 
1758
 
 
1759
   local durable_repl="$(feat_on "$file" innodb_overwrite_relay_log_info)"
 
1760
   if [ "${durable_repl:-""}" = "Not Supported" ]; then
 
1761
      durable_repl="$(feat_on "$file" innodb_recovery_update_relay_log)"
 
1762
   fi   
 
1763
   name_val "Durable Replication" "$durable_repl"
 
1764
 
 
1765
   local import_innodb="$(feat_on "$file" innodb_expand_import)"
 
1766
   if [ "${import_innodb:-""}" = "Not Supported" ]; then
 
1767
      import_innodb="$(feat_on "$file" innodb_import_table_from_xtrabackup)"
 
1768
   fi   
 
1769
   name_val "Import InnoDB Tables" "$import_innodb"
 
1770
 
 
1771
   local fast_restarts="$(feat_on "$file" innodb_auto_lru_dump)"
 
1772
   if [ "${fast_restarts:-""}" = "Not Supported" ]; then
 
1773
      fast_restarts="$(feat_on "$file" innodb_buffer_pool_restore_at_startup)"
 
1774
   fi
 
1775
   name_val "Fast Server Restarts" "$fast_restarts"
 
1776
   
1756
1777
   name_val "Enhanced Logging"      \
1757
1778
            "$(feat_on "$file" log_slow_verbosity ne microtime)"
1758
1779
   name_val "Replica Perf Logging"  \
1759
1780
            "$(feat_on "$file" log_slow_slave_statements)"
1760
 
   name_val "Response Time Hist."   \
1761
 
            "$(feat_on "$file" enable_query_response_time_stats)"
1762
 
   name_val "Smooth Flushing"       \
1763
 
            "$(feat_on "$file" innodb_adaptive_checkpoint ne none)"
 
1781
 
 
1782
   local resp_time_hist="$(feat_on "$file" enable_query_response_time_stats)"
 
1783
   if [ "${resp_time_hist:-""}" = "Not Supported" ]; then
 
1784
      resp_time_hist="$(feat_on "$file" query_response_time_stats)"
 
1785
   fi
 
1786
   name_val "Response Time Hist." "$resp_time_hist"
 
1787
 
 
1788
   local smooth_flushing="$(feat_on "$file" innodb_adaptive_checkpoint)"
 
1789
   if [ "${smooth_flushing:-""}" = "Not Supported" ]; then
 
1790
      smooth_flushing="$(feat_on "$file" innodb_adaptive_flushing_method)"
 
1791
   fi
 
1792
   name_val "Smooth Flushing" "$smooth_flushing"
 
1793
   
1764
1794
   name_val "HandlerSocket NoSQL"   \
1765
1795
            "$(feat_on "$file" handlersocket_port)"
1766
1796
   name_val "Fast Hash UDFs"   \