More fixes:

- pt-mysql-summary's --read-samples shouldn't need an active connection
- Bunch of pt-summary bugs, particularly several relating to disks.
This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-03-27 12:53:31 -03:00
parent 64b52c9399
commit ae6c1e3789
11 changed files with 50 additions and 47 deletions

View File

@@ -1036,7 +1036,7 @@ parse_mysqld_instances () {
echo " ===== ========================== ==== === ======"
grep '/mysqld ' "$file" | while read line; do
local pid=$(echo "$line" | awk '{print $2;}')
local pid=$(echo "$line" | awk '{print $1;}')
for word in ${line}; do
if echo "${word}" | grep -- "--socket=" > /dev/null; then
socket="$(echo "${word}" | cut -d= -f2)"
@@ -2260,7 +2260,9 @@ if [ "${0##*/}" = "$TOOL" ] \
fi
# Check if mysql and mysqldump are there, otherwise bail out early.
check_mysql
# But don't if they passed in --read-samples, since we don't need
# a connection then.
[ "$OPT_READ_SAMPLES" ] || check_mysql
main "$@"
fi