How to view MySql running resources

If your server’s mysql always in high resources or down, I suggest you use this command to trace out which database that eat up your MySql resource

  • /usr/bin/mysqladmin proc stat
  • /usr/bin/watch -n 5 ‘mysqladmin proc stat’

Every 5.0s: mysqladmin proc stat Sat Aug 28 02:05:06 2010

+------+----------+-----------+----+---------+------+-------+------------------+
|  Id  |   User   | Host      | db | Command | Time | State | Info             |
+------+----------+-----------+----+---------+------+-------+------------------+
| 1404 | da_admin | localhost |    | Query   |  0   |       | show processlist |
+------+----------+-----------+----+---------+------+-------+------------------+
Uptime: 1408 Threads: 1 Questions: 32688 Slow queries: 1 Opens: 218 Flush tables: 1 Open table
s: 211 Queries per second avg: 23.215


This will show up your MySql running resources every 5 seconds.


Tags: , ,

Translate

Buy me a Caffè Latte

Thank you for the Caffè Latte

2013/02/15 saw art
2013/01/25 Parul Patel
2012/11/20 Barbara Nicholas $10
2012/10/08 Amy Stockman $5
2012/07/15 siewho chang $ 50
2012/06/08 Susan Hampton $10
2012/05/11 Chris Grima $10