diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index fd51f7e1..b165e805 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -1586,7 +1586,7 @@ format_ndb_status() { local file=$1 [ -e "$file" ] || return - cat "$file" + egrep '^[ \t]*Name:|[ \t]*Status:' ndb_status.txt|sed 's/^[ \t]*//g'|while read line; do echo $line; echo $line | grep '^Status:'>/dev/null && echo ; done } format_overall_db_stats () { diff --git a/lib/bash/report_mysql_info.sh b/lib/bash/report_mysql_info.sh index 02839527..9bb6dfb6 100644 --- a/lib/bash/report_mysql_info.sh +++ b/lib/bash/report_mysql_info.sh @@ -561,8 +561,8 @@ format_ndb_status() { local file=$1 [ -e "$file" ] || return - # at the time being, just cat the file. - cat "$file" + # We could use "& \n" but that does not seem to work on bsd sed. + egrep '^[ \t]*Name:|[ \t]*Status:' ndb_status.txt|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