Percona-Tookit工具包之pt-mysql-summary
pt-mysql-summary [OPTIONS]
Common Parameters
--all-databases //Specify the scope is all databases for summarizing.
--databases //Specify the only database for summarizing.
--default-files //Specify the configuration file to use.
--list-encrypted-tables //Specify to contain encrypted tables in all databases.
--read-samples //Create a report from this file you sepcified.
--save-samples //Save to the direcotry you want to store the summary.
--sleep //Seconds to sleep for counter.
[root@zlm1 :: ~]
#pt-mysql-summary --user=root --password=Passw0rd --host=localhost
mysql: [Warning] Using a password on the command line interface can be insecure.
# Percona Toolkit MySQL Summary Report #######################
System time | -- :: UTC (local TZ: CEST +)
# Instances ##################################################
Port Data Directory Nice OOM Socket
===== ========================== ==== === ======
# MySQL Executable ###########################################
# Slave Hosts ################################################
No slaves found //The slave server is not started up yet.
# Report On Port ######################################## //Summary of overall of MySQL server.
User | root@localhost
Time | -- :: (CEST)
Hostname | zlm1
Version | 5.7.-log MySQL Community Server (GPL)
Built On | linux-glibc2. x86_64
Started | -- : (up +::)
Databases |
Datadir | /data/mysql/mysql3306/data/
Processes | connected, running
Replication | Is not a slave, has slaves connected
Pidfile | mysql.pid (does not exist)
# Processlist ################################################ //This is all the contents in processlist. Command COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
Query
Sleep User COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
monitor
root Host COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
localhost
zlm1 db COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
NULL State COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- --------- starting # Status Counters (Wait Seconds) ########################## //This paragragh shows the global status of MySQL and with 10 secs' differential values.
Variable Per day Per second secs
Bytes_received
Bytes_sent
Com_admin_commands
Com_select
Com_set_option
Com_show_slave_status
Com_show_status
Com_show_variables
Connections
Created_tmp_files
Created_tmp_tables
Flush_commands
Handler_commit
Handler_external_lock
Handler_read_first
Handler_read_key
Handler_read_next
Handler_read_rnd_next
Handler_write
Innodb_buffer_pool_bytes_data
Innodb_buffer_pool_pages_flushed
Innodb_buffer_pool_read_requests
Innodb_buffer_pool_reads
Innodb_buffer_pool_write_requests
Innodb_data_fsyncs
Innodb_data_read
Innodb_data_reads
Innodb_data_writes
Innodb_data_written
Innodb_dblwr_pages_written
Innodb_dblwr_writes
Innodb_log_writes
Innodb_os_log_fsyncs
Innodb_os_log_written
Innodb_pages_created
Innodb_pages_read
Innodb_pages_written
Innodb_rows_read
Innodb_num_open_files
Innodb_available_undo_logs
Key_read_requests
Key_reads
Open_table_definitions
Opened_files
Opened_table_definitions
Opened_tables
Queries
Questions
Select_scan
Table_locks_immediate
Table_open_cache_hits
Table_open_cache_misses
Threads_created
Uptime
# Table cache ################################################
Size |
Usage | %
# Key Percona Server features ################################ //Because mine is not percona version,so most of the features are not supported.
Table & Index Stats | Not Supported
Multiple I/O Threads | Enabled
Corruption Resilient | Not Supported
Durable Replication | Not Supported
Import InnoDB Tables | Not Supported
Fast Server Restarts | Not Supported
Enhanced Logging | Not Supported
Replica Perf Logging | Enabled
Response Time Hist. | Not Supported
Smooth Flushing | Not Supported
HandlerSocket NoSQL | Not Supported
Fast Hash UDFs | Unknown
# Percona XtraDB Cluster ##################################### //If we are using PXC structure,this paragraph will show the detail of it.
# Plugins ####################################################
InnoDB compression | ACTIVE
# Query cache ################################################
query_cache_type | OFF
Size | 0.0
Usage | %
HitToInsertRatio | %
# Semisynchronous Replication ################################ //Information of semi-replication if there's a master-slave replication.
Master | Disabled
Slave | Disabled
# Schema #####################################################
Specify --databases or --all-databases to dump and summarize schemas
# Noteworthy Technologies ####################################
SSL | No
Explicit LOCK TABLES | No
Delayed Insert | No
XA Transactions | No
NDB Cluster | No
Prepared Statements | No
Prepared statement count |
# InnoDB #####################################################
Version | 5.7.
Buffer Pool Size | 100.0M
Buffer Pool Fill | %
Buffer Pool Dirty | %
File Per Table | ON
Page Size | 16k
Log File Size | * 100.0M = 300.0M
Log Buffer Size | 8M
Flush Method | O_DIRECT
Flush Log At Commit |
XA Support | ON
Checksums | ON
Doublewrite | ON
R/W I/O Threads |
I/O Capacity |
Thread Concurrency |
Concurrency Tickets |
Commit Concurrency |
Txn Isolation Level | READ-COMMITTED
Adaptive Flushing | ON
Adaptive Checkpoint |
Checkpoint Age |
InnoDB Queue | queries inside InnoDB, queries in queue
Oldest Transaction | Seconds
History List Len |
Read Views |
Undo Log Entries | transactions, total undo, max undo
Pending I/O Reads | buf pool reads, normal AIO, ibuf AIO, preads
Pending I/O Writes | buf pool ( LRU, flush list, page); AIO, sync, log IO ( log, chkp); pwrites
Pending I/O Flushes | buf pool, log
Transaction States | 1xnot started
# MyISAM #####################################################
Key Cache | 8.0M
Pct Used | %
Unflushed | %
# Security ###################################################
Users | users, anon, w/o pw, old pw
Old Passwords |
# Encryption #################################################
mysql: [Warning] Using a password on the command line interface can be insecure.
No keyring plugins found
# Binary Logging #############################################
Binlogs |
Zero-Sized |
Total Size | .0k
binlog_format | ROW
expire_logs_days |
sync_binlog |
server_id |
binlog_do_db |
binlog_ignore_db |
# Noteworthy Variables #######################################
Auto-Inc Incr/Offset | /
default_storage_engine | InnoDB
flush_time |
init_connect |
init_file |
sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
join_buffer_size | 128k
sort_buffer_size | 128k
read_buffer_size | 2M
read_rnd_buffer_size | 16M
bulk_insert_buffer | 0.00
max_heap_table_size | 96M
tmp_table_size | 96M
max_allowed_packet | 4M
thread_stack | 192k
log |
log_error | ./error.log
log_warnings |
log_slow_queries |
log_queries_not_using_indexes | OFF
log_slave_updates | ON
# Configuration File #########################################
Config File | /etc/my.cnf [mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
symbolic-links = [mysqld_safe]
log-error = /var/log/mariadb/mariadb.log
pid-file = /var/run/mariadb/mariadb.pid [mysql]
prompt = "\\u@\\h:\\p [\\d]\\>"
user = zlm
password = zlmzlm
host = 192.168.56.100 [client]
user = zlm
password = zlmzlm
socket = /tmp/mysql3306.sock
host = 192.168.56.100
# Memory management library ##################################
jemalloc is not enabled in mysql config for process with id
# The End #################################################### [root@zlm1 :: ~]
#
Execute it again while slave is working normally with option "--database" and "--save-samples"
[root@zlm1 :: ~]
#pt-mysql-summary --user=root --password=Passw0rd --host=localhost --databases zlm --save-samples=/root/zlm.rpl
mysql: [Warning] Using a password on the command line interface can be insecure.
# Percona Toolkit MySQL Summary Report #######################
System time | -- :: UTC (local TZ: CEST +)
# Instances ##################################################
Port Data Directory Nice OOM Socket
===== ========================== ==== === ======
# MySQL Executable ###########################################
# Slave Hosts ################################################ //Now,it shows the slave's information.
*************************** . row ***************************
Server_id:
Host:
Port:
Master_id:
Slave_UUID: 2b199d1f-94df-11e8-ae46-080027de0e0e
# Report On Port ########################################
User | root@localhost
Time | -- :: (CEST)
Hostname | zlm1
Version | 5.7.-log MySQL Community Server (GPL)
Built On | linux-glibc2. x86_64
Started | -- : (up +::)
Databases |
Datadir | /data/mysql/mysql3306/data/
Processes | connected, running
Replication | Is not a slave, has slaves connected
Pidfile | mysql.pid (does not exist)
# Processlist ################################################ Command COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
Binlog Dump GTID
Query
Sleep User COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
monitor
repl
root Host COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
localhost
zlm1
zlm2 db COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
NULL State COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- --------- Master has sent all binlog to //This is the dump thread of master working in replicatoin.
starting # Status Counters (Wait Seconds) ##########################
Variable Per day Per second secs
Bytes_received
Bytes_sent
Com_admin_commands
Com_select
Com_set_option
Com_show_binlogs
Com_show_databases
Com_show_engine_status
Com_show_master_status
Com_show_plugins
Com_show_processlist
Com_show_slave_hosts
Com_show_slave_status
Com_show_status
Com_show_storage_engines
Com_show_variables
Connections
Created_tmp_disk_tables
Created_tmp_files
Created_tmp_tables
Flush_commands
Handler_commit
Handler_external_lock
Handler_read_first
Handler_read_key
Handler_read_next
Handler_read_rnd_next
Handler_write
Innodb_buffer_pool_bytes_data
Innodb_buffer_pool_pages_flushed
Innodb_buffer_pool_read_requests
Innodb_buffer_pool_reads
Innodb_buffer_pool_write_requests
Innodb_data_fsyncs
Innodb_data_read
Innodb_data_reads
Innodb_data_writes
Innodb_data_written
Innodb_dblwr_pages_written
Innodb_dblwr_writes
Innodb_log_writes
Innodb_os_log_fsyncs
Innodb_os_log_written
Innodb_pages_created
Innodb_pages_read
Innodb_pages_written
Innodb_rows_inserted
Innodb_rows_read
Innodb_num_open_files
Innodb_available_undo_logs
Key_read_requests
Key_reads
Open_table_definitions
Opened_files
Opened_table_definitions
Opened_tables
Queries
Questions
Select_scan
Table_locks_immediate
Table_open_cache_hits
Table_open_cache_misses
Threads_created
Uptime
# Table cache ################################################
Size |
Usage | %
# Key Percona Server features ################################
Table & Index Stats | Not Supported
Multiple I/O Threads | Enabled
Corruption Resilient | Not Supported
Durable Replication | Not Supported
Import InnoDB Tables | Not Supported
Fast Server Restarts | Not Supported
Enhanced Logging | Not Supported
Replica Perf Logging | Enabled
Response Time Hist. | Not Supported
Smooth Flushing | Not Supported
HandlerSocket NoSQL | Not Supported
Fast Hash UDFs | Unknown
# Percona XtraDB Cluster #####################################
# Plugins ####################################################
InnoDB compression | ACTIVE
# Query cache ################################################
query_cache_type | OFF
Size | 0.0
Usage | %
HitToInsertRatio | %
# Semisynchronous Replication ################################ //The semi-sync replication is still not used.
Master | Disabled
Slave | Disabled
# Schema ##################################################### //Because of the option of "--databases",it shows the detail of it. Database Tables Views SPs Trigs Funcs FKs Partn
zlm Database InnoDB
zlm Database
zlm i c
n h
t a
r
Database === ===
zlm # Noteworthy Technologies ####################################
Full Text Indexing | No
Geospatial Types | No
Foreign Keys | No
Partitioning | No
InnoDB Compression | No
SSL | No
Explicit LOCK TABLES | No
Delayed Insert | No
XA Transactions | No
NDB Cluster | No
Prepared Statements | No
Prepared statement count |
# InnoDB #####################################################
Version | 5.7.
Buffer Pool Size | 100.0M
Buffer Pool Fill | %
Buffer Pool Dirty | %
File Per Table | ON
Page Size | 16k
Log File Size | * 100.0M = 300.0M
Log Buffer Size | 8M
Flush Method | O_DIRECT
Flush Log At Commit |
XA Support | ON
Checksums | ON
Doublewrite | ON
R/W I/O Threads |
I/O Capacity |
Thread Concurrency |
Concurrency Tickets |
Commit Concurrency |
Txn Isolation Level | READ-COMMITTED
Adaptive Flushing | ON
Adaptive Checkpoint |
Checkpoint Age |
InnoDB Queue | queries inside InnoDB, queries in queue
Oldest Transaction | Seconds
History List Len |
Read Views |
Undo Log Entries | transactions, total undo, max undo
Pending I/O Reads | buf pool reads, normal AIO, ibuf AIO, preads
Pending I/O Writes | buf pool ( LRU, flush list, page); AIO, sync, log IO ( log, chkp); pwrites
Pending I/O Flushes | buf pool, log
Transaction States | 1xnot started
# MyISAM #####################################################
Key Cache | 8.0M
Pct Used | %
Unflushed | %
# Security ###################################################
Users | users, anon, w/o pw, old pw
Old Passwords |
# Encryption #################################################
mysql: [Warning] Using a password on the command line interface can be insecure.
No keyring plugins found
# Binary Logging #############################################
Binlogs |
Zero-Sized |
Total Size | .0k
binlog_format | ROW
expire_logs_days |
sync_binlog |
server_id |
binlog_do_db |
binlog_ignore_db |
# Noteworthy Variables #######################################
Auto-Inc Incr/Offset | /
default_storage_engine | InnoDB
flush_time |
init_connect |
init_file |
sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
join_buffer_size | 128k
sort_buffer_size | 128k
read_buffer_size | 2M
read_rnd_buffer_size | 16M
bulk_insert_buffer | 0.00
max_heap_table_size | 96M
tmp_table_size | 96M
max_allowed_packet | 4M
thread_stack | 192k
log |
log_error | ./error.log
log_warnings |
log_slow_queries |
log_queries_not_using_indexes | OFF
log_slave_updates | ON
# Configuration File #########################################
Config File | /etc/my.cnf [mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
symbolic-links = [mysqld_safe]
log-error = /var/log/mariadb/mariadb.log
pid-file = /var/run/mariadb/mariadb.pid [mysql]
prompt = "\\u@\\h:\\p [\\d]\\>"
user = zlm
password = zlmzlm
host = 192.168.56.100 [client]
user = zlm
password = zlmzlm
socket = /tmp/mysql3306.sock
host = 192.168.56.100
# Memory management library ##################################
jemalloc is not enabled in mysql config for process with id
# The End #################################################### [root@zlm1 :: ~]
#ls -l|grep rpl
drwxr-xr-x root root Aug : zlm.rpl [root@zlm1 :: ~]
#cd zlm.rpl [root@zlm1 :: ~/zlm.rpl]
#ls -l
total
-rw-r--r-- root root Aug : collect.err
-rw-r--r-- root root Aug : innodb-status
-rw-r--r-- root root Aug : mysql-config-file
-rw-r--r-- root root Aug : mysql-databases
-rw-r--r-- root root Aug : mysqld-executables
-rw-r--r-- root root Aug : mysqld-instances
-rw-r--r-- root root Aug : mysqldump
-rw-r--r-- root root Aug : mysql-master-logs
-rw-r--r-- root root Aug : mysql-master-status
-rw-r--r-- root root Aug : mysql-plugins
-rw-r--r-- root root Aug : mysql-processlist
-rw-r--r-- root root Aug : mysql-roles
-rw-r--r-- root root Aug : mysql-slave
-rw-r--r-- root root Aug : mysql-slave-hosts
-rw-r--r-- root root Aug : mysql-status
-rw-r--r-- root root Aug : mysql-status-defer
-rw-r--r-- root root Aug : mysql-users
-rw-r--r-- root root Aug : mysql-variables
-rw-r--r-- root root Aug : ndb-status //The directory of "zlm.rpl" contains individual collecting information of the connected MySQL server.You can check them for future use.
- pt-mysql-summary is a report tool for collecting information of MySQL servers.
- It's easy enough to use by merely specify several connection options.
- It can tremendously increase the efficiency of summaring a large amount of MySQL servers.
Percona-Tookit工具包之pt-mysql-summary的更多相关文章
- percona innobackupex 遇到 connect to MySQL server as DBD::mysql module is not installed 问题
percona innobackupex connect to MySQL server as DBD::mysql module is not installed [root@mysql softw ...
- 利用Percona monitoring for zabbix监控MySQL
系统要求 被监控的主机及mysql监控账号,zabbix agent 2.0或以上(最好与zabbix-server版本相同),php, php-mysql(php版本没有限制,经测试5.3是可以的. ...
- 【Linux】【Database】【MySQL】使用percona搭建高可用的MySQL数据库
1. 简介 1.1. 官方文档: 数据库架构:https://docs.openstack.org/ha-guide/shared-database.html 1.2. 本次使用的的是Percona ...
- SQL慢查询安装过程
SQL慢查询 基本操作 打开防火墙 firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd --reload 安 ...
- Percona Toolkit mysql辅助利器
1 PT介绍 Percona Toolkit简称pt工具—PT-Tools,是Percona公司开发用于管理MySQL的工具,功能包括检查主从复制的数据一致性.检查重复索引.定位IO占用高的表文件.在 ...
- Mysql 主从一致校验工具------Maatkit工具包
Maatkit工具包 http://www.maatkit.org/ 简介 maatkit是一个开源的工具包,为mysql日常管理提供了帮助.目前,已被Percona公司收购并维护.其中: mk-ta ...
- mysql高可用之PXC(Percona XtraDB Cluster)
简介 Percona XtraDB Cluster是MySQL高可用性和可扩展性的解决方案,Percona XtraDB Cluster提供的特性如下: 1).同步复制,事务要么在所有节点提交或不提交 ...
- 【MySQL】TokuDB引擎初探(MySQL升级为Percona,MySQL升级为MariaDB)
参考:http://blog.sina.com.cn/s/blog_4673e6030102v46l.html 参考:http://hcymysql.blog.51cto.com/5223301/14 ...
- MySQL/MariaDB/Percona数据库升级脚本
MySQL/MariaDB/Percona数据库升级脚本截取<OneinStack>中upgrade_db.sh, 一般情况下不建议升级数据库版本,该脚本专提供给各位版本控们.为防止大版本 ...
- MySQL分支Percona, cmake编译安装
Percona是在MySQL基础上改进的,在功能和性能上有着很显著的提升.该版本提升了在高负载情况下的InnoDB的性能,为DBA提供一些非常有用的性能诊断工具:另外有更多的参数和命令来控制服务器行为 ...
随机推荐
- position中需要注意的地方
relative是相对元素本身位置进行移位,但不会改变本身位置的大小 本身的位置 移位后,可以看到,p5的位置还是在那,并不会自动往上走,也就是p2的位置原来所占据的位置不变的.不会因为偏移而改变布局 ...
- VOJ1067 【矩阵经典7 构造矩阵】
任意门:https://vijos.org/records/5be95b65d3d8a1366270262b 背景 守望者-warden,长期在暗夜精灵的的首都艾萨琳内担任视察监狱的任务,监狱是成长条 ...
- [19/03/15-星期五] 常用类_String类&StringBuilder和StringBuffer类
一.基本概念 String 类对象代表不可变的Unicode字符序列,因此我们可以将String对象称为“不可变对象”. 那什么叫做“不可变对象”呢? 指的是对象内部的成员变量的值无法再改变.Str ...
- mysql时间日期函数
now(), current_timestamp(); -- 当前日期时间 current_date(); -- 当前日期 current_time(); -- 当前时间 date('yyyy-mm- ...
- 【luogu P1186 玛丽卡】 题解
题目链接:https://www.luogu.org/problemnew/show/P1186 邻接表开大开小真的奇妙,毒瘤玩意,再您妈的见. #include <queue> #inc ...
- 匿名union
#include <stdio.h> enum node_type{ t_int,t_double}; struct node{ enum node_type type; ...
- Javascript中的内存泄漏
最新博客站点:欢迎来访 一.内存泄漏 由于某些原因不再需要的内存没有被操作系统或则空闲内存池回收.编程语言中有多种管理内存的方式.这些方式从不同程度上会减少内存泄漏的几率,高级语言嵌入了 ...
- php第一节(入门语法、数据类型)
<?php /** * 变量命名用 $ 符 * 变量名称的命名规范 * 1.变量名称以$标示 * 2.变量名称只能以字母和下划线开头 * 3.变量的名称只能包含字母.下划线.数字 * 4.变量名 ...
- [USACO11OPEN]奶牛跳棋Cow Checkers(博弈论)
题目描述 One day, Bessie decides to challenge Farmer John to a game of 'Cow Checkers'. The game is playe ...
- HDU 6330--Visual Cube(构造,计算)
Visual Cube 将这个立方体分块,分成上中下三个部分,利用长宽高计算行列,最后输出即可. 每个部分都分成奇偶行来输出,总共有\(2*(b+c)+1\)行,共\(2*(a+b)+1\)列.设当前 ...