MySQL necessary monitoring project--turn from the potato Great God Blog

Source: Internet
Author: User

show status; flush status; view current number of connections  SHOW STATUS LIKE  ' thread_% '; Thread_cached: Number of threads cached thread_running: Number of threads active thread_connected: Number of threads currently connected thread_created: The number of threads that are created in total  cache hits thread_connected = show global status like thread_ Created connections = show global status like  ' Connections '; Tch= (1 -  (threads_created / connections))  * 100 View active connection content show processlist; if  tch number less than 90%, creating a connection takes time and increases the number of thread_cached Qpsquestions = show global status like   ' Questions '; uptime = show global status like  ' Uptime '; qps=questions/uptime tpscom_commit = show global status like  ' Com_commit '; com_rollback = show global status like  ' Com_rollback '; uptime = show global status like  ' Uptime '; Tps= (Com_commit + com_rOllback)/uptimeqps  and  tps values must be monitored in real time, and if you are close to the test peaks of the architecture, may God be with you read/writes ratioqcache_hits =  SHOW GLOBAL STATUS LIKE  ' qcache_hits '; com_select = show global status like  ' Com_select '; com_insert = show global status like  ' Com_insert '; com_update = show global status like  ' com_update '; com_delete = show global status like  ' Com_delete '; com_replace = show global status like  ' Com_replace '; r/w= (com_select + qcache_hits)  /  (com_insert + com_update + com_delete  + com_replace)  * 100 read-write ratio, the important basis for optimizing the database, read more to optimize reading, write more to optimize write slow queries per  minuteslow_queries = show global status like  ' Slow_queries '; uptime = show global status like  ' Uptime '; sqpm=slow_queries /  (UPTIME/60) slow queries /questions ratioslow_queries = show global status like  ' Slow_ Queries '; questions = show global status like  ' Questions '; s/q=slow_queries/questions  new version on the line to focus on slow query, let the test to kick the developer's butt Full_join per minuteselect_full_join  = SHOW GLOBAL STATUS LIKE  ' Select_full_join '; uptime = show global status like  ' Uptime '; fjpm=select_full_join /  (UPTIME/60) does not use the index to create Full_join, optimize the index go innodb buffer read  hitsinnodb_buffer_pool_reads = show global status like  ' Innodb_buffer_pool_reads ';innodb_buffer_pool_read_requests = show global status like  ' Innodb_buffer_pool _read_requests '; ifrh= (1 - innodb_buffer_pool_reads/innodb_buffer_pool_read_requests)  *  100innodb buffer hit   Target  95%-99%; Table cacheopen_tables= show global status like&nBSP; ' Open_tables ';opened_tables= show global status like  ' Opened_tables '; table_cache=  SHOW GLOBAL STATUS LIKE  ' Table_cache '; Table_cache should be greater than  Open_tables  less than   opened_tables temp tables to disk ratiocreated_tmp_tables = show  global status like  ' Created_tmp_tables '; created_tmp_disk_tables = show global status like  ' Created_tmp_disk_tables '; Tdr= (created_tmp_disk_tables/created_tmp_tables) *100show global status like  ' Innodb_row_ lock_% '; innodb_row_lock_current_waitsthe number of row locks currently being  waited for. added in mysql 5.0.3.innodb_row_lock_timethe total time  spent in acquiring row locks, in milliseconds. Added in  Mysql 5.0.3.innodb_row_lock_time_avgthe average time to acquIre a row lock, in milliseconds. added in mysql 5.0.3.innodb_row_ lock_time_maxthe maximum time to acquire a row lock, in  Milliseconds. added in mysql 5.0.3.innodb_row_lock_waitsthe number of times  a row lock had to be waited for. Added in MySQL  5.0.3.


MySQL necessary monitoring project--turn from the potato Great God Blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.