Top Useful MySQL Variables, That you Might Want to Monitor
Displays the maximum number of connection made at any instance of time.
mysql -p -e”show global status” | grep Max_used_connections
Indicates the total number of open connections to the server
mysql -p -e”show global status” | grep Threads_connected
Temporary tables created on disk instead of memory.
Handler_read_first : Number a table handler made a request to read the first row of a table index. This indicates that the table is not properly indexed.
Number of times mysql had to wait for memory pages to be flushed. If high, memory buffer is not correctly configured for the number of writes the server is currently doing.
**** Number of times mysql had to perform filesystem access to fetch database indexes. If this variable is high, Mysql’s key cache is overloaded and should be increased.
Number of tables that are currently open. If this is low and table_cache value is high, it is safe to reduce the cache size. If the value is high and close to table_cache, increasing table_cache will help.
Indicates the number of full joins that had to be performed for the queries. High value indicates that MySQL had to do full table join instead of using indexes. In this case a greater indexing is required for the corresponding tables.
**** Indicates the number of queries that are slower than usual. You can adjust the length of time to be called slow in my.cnf file.
**** Indicates the number of seconds since the service was last restarted.
Note: You can use the following command to view the variables :
mysqladmin variables -uroot -p”PASSWORD”