监控mysql的几个脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了监控mysql的几个脚本相关的知识,希望对你有一定的参考价值。

参考技术A 如果您不太熟悉mysql监控,开始可以看一看流行的监控软件。例如,下面列出了MySQL Cacti Plugin

Innodb Buffer Pool Activity

•Pages Created
•Pages Written
•Pages Read
Innodb Buffer Pool Pages

•Pool Size
•Database Pages
•Free Pages
•Modified Pages
Inoodb File I/O

•File Reads
•Files Writes
•Log Writes
•File Fsyncs
Innodb Pending I/O

•Aio Log ios
•Aio Sync ios
•Buffer Pool Flushes
•Chkp Writes
•Ibuf Aio Reads
•Log Flushes
•Log Writes
•Normal Aio Reads
•Normal Aio Writes
Innodb Insert Buffer

•Inserts
•Merged
•Merges
Innodb Log

•Log Buffer Size
•Log Bytes Written
•Log Bytes Flushed
•Unflushed Log
Innodb Row Operations

•Rows Read
•Rows Deleted
•Rows Updated
•Rows Inserted
Innodb Semaphores

•Spin Rounds
•Spin Waits
•OS Waits
Innodb Transactions

•Innodb Transactions
•Current Transactions
•History List
•Read Views
MySQL Binary/Relay Logs

•Binlog Cache use
•Binlog Cache Disk Use
•Binary Log Space
•Relay Log Space
MySQL Command Counters

•Questions
•SELECT
•DELETE
•INSERT
•UPDATE
•REPLACE
•LOAD
•DELETE MULTI
•INSERT SELECT
•UPDATE MULTI
•REPLACE SELECT
MySQL Connections

•Max Connections
•Max Used Connections
•Aborted Clients
•Aborted Connects
•Threads Connected
•Connections
MySQL Files and Tables

•Table Cache
•Open Tables
•Open Files
•Opened Tables
MySQL Network Traffic

•Bytes Received
•Bytes Sent
MySQL Processlist

•State Closing Tables
•State Copying to Tmp Table
•State End
•State Freeing Items
•State Init
•State Locked
•State Login
•State Preparing
•State Reading From Net
•State Sending Data
•State Sorting Result
•State Statistics
•State Updating
•State Writing to Net
•State None
•State Other
MySQL Query Cache

•Queries In Cache
•Hits
•Inserts
•Not Cached
•Lowmem Prunes
MySQL Query Cache Memory

•Query Cache Size
•Free Memory
•Total Blocks
•Free Blocks
MySQL Replication

•Slave Running
•Slave Stopped
•Slave Lag
•Slave Open Temp Tables
•Slave Retried Transactions
MySQL Select Types

•Select Full Join
•Select Full Range Join
•Select Range
•Select Range Check
•Select Scan
MySQL Sorts

•Sort Rows
•Sort Range
•Sort Merge Passes
•Sort Scan
MySQL Table Locks

•Table Locks Immediate
•Table Locks Waited
•Slow Queries
MySQL Temporary Objects

•Created Tmp Tables
•Created Tmp Disk Tables
•Created Tmp Files
MySQL Threads

•Thread Cache Size
•Threads Created本回答被提问者和网友采纳

Linux系统监控的几个命令

uptime
  系统时间、运行时间、连接数(没一个终端算一个连接)、在1,5,15分钟内系统负载

 

vmstat 1 3   监控系统CPU内存等,一秒采样一次,一共采样四次

 

pidstat命令
  a.需要安装 yum install sysstat
  b.pidstat -p 2962 -u 1 3   监控2962线程,每秒采样一次共采样三次
  c.pidstat -p 2962 -t      线程进程信息 









以上是关于监控mysql的几个脚本的主要内容,如果未能解决你的问题,请参考以下文章

Python脚本监控mysql数据库,Python脚本监控mongo数据库

mysql主从状态监控脚本报警脚本

zabbix监控mysql主从状态

mysql主从同步脚本监控脚本

mysql主从同步监控脚本

MySQL的keepalived高可用监控脚本