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命令,用于检查当前正在执行的SQL语句,并通过一系列的命令进行处理以实现查询结果的有效展示。该命令首先展示进程列表,然后筛选出非空的信息字段,最后对这些信息进行统计和排序。
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
1077
1032

被折叠的 条评论
为什么被折叠?