查看正在执行的语句有哪些,并做好归并排序:
mysql -uroot -e 'show processlist\G'|grep 'Info'|grep -v "NULL"|awk -F ":" '{print $2}'|sort|uniq -c|sort -rn;
查询结果:
Warning: Using a password on the command line interface can be insecure.
1 show processlist
查看正在执行的语句有哪些,并做好归并排序:
mysql -uroot -e 'show processlist\G'|grep 'Info'|grep -v "NULL"|awk -F ":" '{print $2}'|sort|uniq -c|sort -rn;
查询结果:
Warning: Using a password on the command line interface can be insecure.
1 show processlist