This article mainly introduces the relevant information about mysql innodb monitoring (system layer, database layer). Friends in need can refer to
mysql innodb monitoring (system layer, database layer)
Regarding MySQL monitoring, mysql provides data collection commands, such as the show status command or reading the GLOBAL_STATUS object of the database informat_schema; you can also use some ready-made monitoring tools for query. The ones currently used are relatively There are many innotop, mysqlreport, mtop, mytop, and orzdba developed by Taobao perl language.
As far as monitoring indicators are concerned, there are system level and database level.
1. The system level includes the system load, cpu, whether the memory has swap, disk IO, and network.
vmstat -w 1 iostat -x -k 1 sar -n DEV 1
2. MySQL database layer
show global status where Variable_name in('xxxx')或者show global status like 'xxx%'
The data collected is generally the total quantity that has been collected. If you want to calculate the number per second, you can calculate it like this, taking TPS as an example. :
1) Number of Sql statement executions QPS------ (Com_select, Com_insert, Com_update, Com_delete)2) Transaction TPS---- (Com_commit, Com_rollback )
3) Row status (increase the number of modified and deleted rows per second)-----(Innodb_rows_inserted, Innodb_rows_updated, Innodb_rows_deleted, Innodb_rows_read) 4) Page status (in the buffer pool The total number of pages, free, dirty, and the number of pages flushed per second) ---- (Innodb_buffer_pool_pages_flushedThe above is the detailed content of Detailed explanation of mysql innodb monitoring (system layer, database layer). For more information, please follow other related articles on the PHP Chinese website!