[root@push-5-221 scripts]# mysql -S /var/lib/mysql/3306/mysql.sock -uroot -phlsms_push_Zaq1xsw@ -e "show processlist;"|awk '{print $5}'|awk 'BEGIN{print "sleep Excute"}{if($NF=="Sleep"){sleeps+=1}}{if($NF="Excute"){excs+=1}}END{print sleeps,excs}' sleep Excute mysql: [Warning] Using a password on the command line interface can be insecure. 28 37 [root@push-5-221 scripts]#
shell统计mysql当前连接数
猜你喜欢
转载自www.cnblogs.com/sky-cheng/p/11121683.html
今日推荐
周排行