Created
August 26, 2014 07:15
-
-
Save kidach1/b766d1993a9c100f6290 to your computer and use it in GitHub Desktop.
[MySQL] processlistをgrep ref: http://qiita.com/kidachi_/items/29805f589d0b365665da
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> show processlist; | |
+----+------+-----------+-------------+---------+------+-------+-----------------------+ | |
| Id | User | Host | db | Command | Time | State | Info | | |
+----+------+-----------+-------------+---------+------+-------+-----------------------+ | |
| 1 | root | localhost | foo_dev | Sleep | 3737 | | NULL | | |
| 3 | root | localhost | bar_dev | Query | 0 | init | show full processlist | | |
+----+------+-----------+-------------+---------+------+-------+-----------------------+ | |
2 rows in set (0.00 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysqladmin -uroot -hyyyy -pxxxx processlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysqladmin -uroot -hxxxx -pyyyy processlist | |
+----+------+-----------+-----------+---------+------+-------+------------------+ | |
| Id | User | Host | db | Command | Time | State | Info | | |
+----+------+-----------+-----------+---------+------+-------+------------------+ | |
| 1 | root | localhost | foo_dev | Sleep | 3770 | | | | |
| 6 | root | localhost | | Query | 0 | init | show processlist | | |
+----+------+-----------+-----------+---------+------+-------+------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysqladmin -uroot -hxxxx -pyyyyy processlist |grep localhost |grep -v processlist | |
| 1 | root | localhost | foo_dev | Sleep | 4095 | | | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment