Last updated on December 1st, 2010 at 12:40 am
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
[adrotate banner=”1″]
This will show up your MySql running resources every 5 seconds.
[adrotate banner=”2″]