mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-11 01:01:36 +08:00
added tokudb captures if the engine is present
This commit is contained in:
11
bin/pt-stalk
11
bin/pt-stalk
@@ -838,6 +838,7 @@ collect() {
|
||||
local mutex="SHOW MUTEX STATUS"
|
||||
fi
|
||||
innodb_status 1
|
||||
tokudb_status 1
|
||||
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status1" &
|
||||
open_tables >> "$d/$p-opentables1" &
|
||||
|
||||
@@ -988,6 +989,7 @@ collect() {
|
||||
fi
|
||||
|
||||
innodb_status 2
|
||||
tokudb_status 2
|
||||
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status2" &
|
||||
open_tables >> "$d/$p-opentables2" &
|
||||
|
||||
@@ -1055,13 +1057,20 @@ transactions() {
|
||||
$CMD_MYSQL $EXT_ARGV -e "SELECT SQL_NO_CACHE * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS\G"
|
||||
}
|
||||
|
||||
tokudb_status() {
|
||||
local n=$1
|
||||
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
|
||||
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
|
||||
}
|
||||
|
||||
innodb_status() {
|
||||
local n=$1
|
||||
|
||||
local innostat=""
|
||||
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW /*!40100 ENGINE*/ INNODB STATUS\G" \
|
||||
>> "$d/$p-innodbstatus$n"
|
||||
>> "$d/$p-innodbstatus$n" || rm -f $d/$p-tokudbstatus$n
|
||||
grep "END OF INNODB" "$d/$p-innodbstatus$n" >/dev/null || {
|
||||
if [ -d /proc -a -d /proc/$mysqld_pid ]; then
|
||||
for fd in /proc/$mysqld_pid/fd/*; do
|
||||
|
||||
Reference in New Issue
Block a user