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

How to understand JavaScript modularity

Table of contents 1. Browser support 2. export ex...

js to achieve the complete steps of Chinese to Pinyin conversion

I used js to create a package for converting Chin...

Simple Implementation of HTML to Create Personal Resume

Resume Code: XML/HTML CodeCopy content to clipboa...

Implementation of element multiple form validation

In the project, form testing is often encountered...

Introduction to HTML Chinese Character Encoding Standard

In HTML, you need to specify the encoding used by...

Four practical tips for JavaScript string operations

Table of contents Preface 1. Split a string 2. JS...

MySQL compressed package version zip installation configuration method

There are some problems with the compressed versi...

Difference between var and let in JavaScript

Table of contents 1. Scopes are expressed in diff...

Two ways to declare private variables in JavaScript

Preface JavaScript is not like other languages ​​...

How to install and configure WSL on Windows

What is WSL Quoting a passage from Baidu Encyclop...

Use HTML to write a simple email template

Today, I want to write about a "low-tech&quo...

A problem with MySQL 5.5 deployment

MySQL deployment Currently, the company deploys M...

MySQL Database Indexes and Transactions

Table of contents 1. Index 1.1 Concept 1.2 Functi...