loop_start_post

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.

the_content_hook

1 thought on “How to view MySql running resources”

  1. Pingback: MySQLTuner result and Tuning Primer result | Justin.my

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

wp_footer