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提供一些非常有用的性能诊断工具:另外有更多的参数和命令来控制服务器行为 ...
随机推荐
- 课堂笔记——循环语句-for
一.循环:多次执行某段代码. 二.循环四要素: 1.初始条件 2.循环条件 3.状态改变 4.循环体 三.for循环 1.语法: for(初始条件;循环条件;状态改变) { 循环体 } 2 ...
- javascript DOM 操作基础知识小结
经常用到javascript对dom,喜欢这方便的朋友也很多,要想更好的对dom进行操作,这些基础一定要知道的. DOM添加元素,使用节点属性 <!DOCTYPE html PUBLIC ...
- 【洛谷P1726】上白泽慧音
上白泽慧音 题目链接 强联通分量模板题,Tarjan求强联通分量,记录大小即可 #include<iostream> #include<cstring> #include< ...
- EJB 配置多个数据源
1.修改jboss-6.simple\server\default\deploy\transaction-jboss-beans.xml 配置文件 <bean name="CoreEn ...
- mysql substring_index()查询某个字符中以某个分割符分割后的值
substring_index(某个字段,以其分割,第几个分割点之前的值); +---------------------------------------------------------+ | ...
- jsp页面的传值(popup)
jsp页面与xml文件对应的关系: 例:网页上jsp的url为----purchase_app_btn.do? 对应xml文件下的 <action path="/purchase_ap ...
- iOS之某公司iOS开发笔试题
参考答案不唯一,大家可以根据自己的理解回答,没有必要跟笔者的一样.参考笔者的答案,也许给你带来灵感! 1.对数组中的元素去重复 例如: NSArray *array = @[@"12-11& ...
- rest_framework --- APIView
一.什么是rest_framework 它是基于Django的,帮助我们快速开发符合RESTful规范的接口框架. 安装方式有很多种,可以通过pip,或者在pycharm中安装也可以 二.APIVie ...
- TCP三次挥手四次握手
三次握手: 客户端发起: 1.向服务器端发送报文SYN=1,ACK=0;客户端进入SYN-SEND状态. 2.服务端收到SYN=1,ACK=0的请求报文,向客户端返回确认报文SYN=1,ACK=1,服 ...
- js中的throw err的作用
1.阻止程序的运行 2.把错误消息打到控制台