mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-11 02:04:38 +08:00
Compare commits
6 Commits
Z-221916
...
fipar-coll
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76b646febe | ||
|
|
48e85c8ca3 | ||
|
|
e90b3a77f5 | ||
|
|
5b9ecef04c | ||
|
|
a77b68ed73 | ||
|
|
58d1d2c3b4 |
@@ -108,6 +108,10 @@ collect_mysql_innodb_status () {
|
||||
$CMD_MYSQL $EXT_ARGV -ssE -e 'SHOW /*!50000 ENGINE*/ INNODB STATUS' 2>/dev/null
|
||||
}
|
||||
|
||||
collect_mysql_ndb_status () {
|
||||
$CMD_MYSQL $EXT_ARGV -ssE -e 'show /*!50000 ENGINE*/ NDB STATUS' 2>/dev/null
|
||||
}
|
||||
|
||||
collect_mysql_processlist () {
|
||||
$CMD_MYSQL $EXT_ARGV -ssE -e 'SHOW FULL PROCESSLIST' 2>/dev/null
|
||||
}
|
||||
@@ -223,6 +227,7 @@ collect_mysql_info () {
|
||||
collect_mysql_plugins > "$dir/mysql-plugins"
|
||||
collect_mysql_slave_status > "$dir/mysql-slave"
|
||||
collect_mysql_innodb_status > "$dir/innodb-status"
|
||||
ndb_status=$(collect_mysql_ndb_status) && echo "$ndb_status" > "$dir/ndb-status"
|
||||
collect_mysql_processlist > "$dir/mysql-processlist"
|
||||
collect_mysql_users > "$dir/mysql-users"
|
||||
|
||||
|
||||
@@ -557,6 +557,14 @@ format_innodb_status () {
|
||||
fi
|
||||
}
|
||||
|
||||
format_ndb_status() {
|
||||
local file=$1
|
||||
|
||||
[ -e "$file" ] || return
|
||||
# We could use "& \n" but that does not seem to work on bsd sed.
|
||||
egrep '^[ \t]*Name:|[ \t]*Status:' $file|sed 's/^[ \t]*//g'|while read line; do echo $line; echo $line | grep '^Status:'>/dev/null && echo ; done
|
||||
}
|
||||
|
||||
# Summarizes per-database statistics for a bunch of different things: count of
|
||||
# tables, views, etc. $1 is the file name. $2 is the database name; if none,
|
||||
# then there should be multiple databases.
|
||||
@@ -1410,6 +1418,14 @@ report_mysql_summary () {
|
||||
fi
|
||||
fi
|
||||
|
||||
# ########################################################################
|
||||
# NDB
|
||||
# ########################################################################
|
||||
if [ -s "$dir/ndb-status" ]; then
|
||||
section "NDB"
|
||||
format_ndb_status "$dir/ndb-status"
|
||||
fi
|
||||
|
||||
# ########################################################################
|
||||
# MyISAM
|
||||
# ########################################################################
|
||||
|
||||
@@ -42,9 +42,9 @@ wait
|
||||
file_count=$(ls "$p" | wc -l)
|
||||
|
||||
if [ "$sys_cnf_file" ]; then
|
||||
n_files=14
|
||||
n_files=15
|
||||
else
|
||||
n_files=13
|
||||
n_files=14
|
||||
fi
|
||||
|
||||
is $file_count $n_files "Creates the correct number of files (without --databases)"
|
||||
|
||||
Reference in New Issue
Block a user