Home > Database > Mysql Tutorial > body text

Detailed explanation of mysql innodb monitoring (system layer, database layer)

PHPz
Release: 2017-04-12 15:19:13
Original
1093 people have browsed it

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
Copy after login

2. MySQL database layer


 show global status where Variable_name in('xxxx')或者show global status like 'xxx%'
Copy after login

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_flushed, Innodb_buffer_pool_pages_data, Innodb_buffer_pool_pages_free, Innodb_buffer_pool_pages_dirty)

              5) Query cache Hit (query cache hit rate)-----(inno_buffer_pool_read_requests, Innodb_buffer_pool_reads)

                       6) Data status (number of data reads and writes per second in the memory buffer, read and write size M per second) ---- (Innodb_data_reads, Innodb_data_writes, Innodb_data_read< ;The amount of data that has been read so far>, Innodb_data_written)

          7) Log (log_fsync The number of times the log is synced to the disk per second, the size of the log written per second M) - ----(Innodb_os_log_fsyncs, Innodb_os_log_written)

        8) Thread status (number of threads created per second) -- ----(Threads_running, Threads_connected, Threads_created, Threads_cached)

                                 ) The amount of data received or sent from the client per second M--- (Bytes_received, Bytes_sent)

Thank you for reading, I hope it can help everyone, thank you for your support of this site!

The 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!