Compare commits

...

6 Commits

Author SHA1 Message Date
Carlos Salguero
76b646febe Small change for ndb status 2017-10-17 17:10:47 -03:00
Fernando Ipar
48e85c8ca3 reverting changes to pt-mysql-summary as update-modules is changing other things beyond the ndb collection 2017-10-16 14:25:34 -03:00
Fernando Ipar
e90b3a77f5 removed accidentally hardcoded file name 2017-10-10 10:52:11 -03:00
Fernando Ipar
5b9ecef04c printing the ndb section 2017-10-10 10:50:26 -03:00
Fernando Ipar
a77b68ed73 Improved formatting of the ndb status a bit 2017-10-10 10:43:58 -03:00
Fernando Ipar
58d1d2c3b4 Added skel for ndb status collector 2017-10-09 22:26:46 -03:00
3 changed files with 23 additions and 2 deletions

View File

@@ -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"

View File

@@ -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
# ########################################################################

View File

@@ -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)"