MySQL InnoDB monitoring (system layer, database layer)

MySQL InnoDB monitoring (system layer, database layer)

MySQL InnoDB monitoring (system layer, database layer)

Regarding MySQL monitoring, MySQL provides commands for data collection, 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 querying, the more commonly used ones are innotop, mysqlreport, mtop, mytop, and orzdba developed by Taobao Perl language.

In terms of monitoring indicators, there are system-level and database-level ones.

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') or show global status like 'xxx%'

The collected data is generally the total number of data currently collected. If you want to calculate the number per second, you can calculate it like this, taking TPS as an example

TPS = current Comm_commit - previously collected Comm_commit / time interval

The following are the main monitoring indicators:

1) SQL statement execution times QPS------(Com_select, Com_insert, Com_update, Com_delete)

2) Transaction TPS----(Com_commit, Com_rollback)

3) Row status (number of rows added, modified, and deleted per second)-----(Innodb_rows_inserted, Innodb_rows_updated, Innodb_rows_deleted, Innodb_rows_read)

4) Page status (total number of pages in the buffer pool, free, dirty, number of pages flushed per second) ----(Innodb_buffer_pool_pages_flushed <number of page flushes>, Innodb_buffer_pool_pages_data <total amount>, Innodb_buffer_pool_pages_free <number of free pages>, Innodb_buffer_pool_pages_dirty <number of dirty pages>)

5) Query cache hit rate-----(inno_buffer_pool_read_requests <total number of logical reads>, Innodb_buffer_pool_reads <total number of physical reads>)

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

7) Log (log_fsync the number of times the log is synced to disk per second, the size of the log written per second M)-----(Innodb_os_log_fsyncs <total number of times the log file is written>, Innodb_os_log_written <number of bytes written to the log file>)

8) Thread status (number of threads created per second)------(Threads_running<number of threads in active state>, Threads_connected<number of currently open connections>, Threads_created<number of newly created threads>, Threads_cached<thread cache value>)

9) 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 you, thank you for your support of this site!

You may also be interested in:
  • InnoDB type MySql restore table structure and data
  • Solution to the problem that the InnoDB engine is disabled when MySQL is started
  • mysql executes sql file and reports error Error: Unknown storage engine'InnoDB' solution
  • Sharing of experience on repairing MySQL innodb exceptions
  • Summary of the operation records of changing MyISAM storage engine to Innodb in MySQL
  • About MySQL innodb_autoinc_lock_mode
  • MySQL Optimization: InnoDB Optimization
  • Detailed explanation of the difference between MyISAM and InnoDB in MySQL storage engine
  • MySQL prompts that the InnoDB feature is disabled and needs to enable InnoDB. Solution
  • Tutorial on the relationship between Innodb transaction isolation level and lock in MySQL
  • Detailed explanation of InnoDB storage files in MySQL

<<:  javascript countdown prompt box

>>:  How to install Zookeeper service on Linux system

Recommend

js canvas realizes rounded corners picture

This article shares the specific code of js canva...

Discussion on image path issues in css (same package/different package)

In CSS files, sometimes you need to use background...

MySQL kill command usage guide

KILL [CONNECTION | QUERY] processlist_id In MySQL...

Detailed explanation of Vue's methods and properties

Vue methods and properties 1. Methods Usage 1 met...

9 Practical CSS Properties Web Front-end Developers Must Know

1. Rounded Corners Today's web designs are con...

Defining the minimum height of the inline element span

The span tag is often used when making HTML web p...

Zabbix monitoring solution - the latest official version 4.4 [recommended]

Zabbix 2019/10/12 Chenxin refer to https://www.za...

How to maintain a long connection when using nginx reverse proxy

· 【Scene description】 After HTTP1.1, the HTTP pro...

The latest 36 high-quality free English fonts shared

01. Infinity Font Download 02. Banda Font Download...

HTML meta usage examples

Example Usage Copy code The code is as follows: &l...

Robots.txt detailed introduction

Robots.txt is a plain text file in which website ...

MySQL: Data Integrity

Data integrity is divided into: entity integrity,...