Preface
 
    As a matter of fact,disk IO is the most important factor which tremendously influence performance of database especially in OLTP which is usually called IO-intensive system.The high concurrency is always in company with high IOPS as well.Furthermore,it's also a bottleneck in many scenarios.Thus,we have to monitor the IO cost of MySQL db by different tools such as zabbix,lepus.They usually provide a entire db performance monitoring not merely IO status.
 
Introduce
 
    pt-ioprofile is a tool of Percona-Toolkit which can be used to monitor the IO activities by MySQL itself.It provide direct and quantitive informations and indicate the real IO costs by different processes or relevent files.pt-ioprofile is the tool which combines lsof and strace to analyze informations.
 
Procedure
 
Usage
 pt-ioprofile [OPTIONS] [FILE]
Main parameter(they're almost entire)
 --aggregate -- Whether use aggregate function or not(default "sum",others "avg").
--cell -- Specify the type of cell contents(default "times",others "size","count").
--group-by -- Specify the type of group by contents(default "filename",others "all","pid").
--profile-process -- Specify the process which is to be profiled(default muysqld).
--profile-pid -- Specify the pid instead of prcocess name.
--run-time -- Specify how long time it will take(default 30s).
--save-samples -- Specify a file which sample data can be put in.
Examples
 
Execute pt-ioprofile to have a test.
 [root@zlm2 :: ~]
#ps aux|grep mysqld
mysql 0.0 19.0 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3306/my.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm2 :: ~]
#pt-ioprofile --cell size --run-time
Tue Jun :: CEST
Tracing process ID
total filename -- There's nothing output here,I'm afraid I've encountered a bug. ###Here's a website about the bug.###
https://bugs.launchpad.net/percona-toolkit/+bug/925778 [root@zlm2 :: ~]
#pt-ioprofile --version
pt-ioprofile 3.0. -- My version of Percorna-Toolkit is 3.0.. [root@zlm2 :: ~]
#yum list|grep percona-toolkit
percona-toolkit.x86_64 3.0.-.el7 installed
Erase the latest Porcona-Toolkit 3.10.0 and change the old version 2.2.20.
 root@zlm2 :: ~]
#yum erase percona-toolkit [root@zlm2 :: ~]
#wget https://www.percona.com/downloads/percona-toolkit/2.2.20/RPM/percona-toolkit-2.2.20-1.noarch.rpm [root@zlm2 :: ~]
#yum localinstall percona-toolkit-2.2.-.noarch.rpm [root@zlm2 :: ~]
#pt-ioprofile --version
pt-ioprofile 2.2. [root@zlm2 :: ~]
#time pt-ioprofile --cell size --run-time
Tue Jun :: CEST
Tracing process ID
total filename -- It still doesn't work properly without a file specified. real 0m11.127s
user 0m0.048s
sys 0m0.081s
There're percona release notes below which describes the bug is fixed in v2.0.3.
 https://www.percona.com/doc/percona-toolkit/3.0/release_notes.html
...
Fixed bug : pt-ioprofile doesn’t run without a file
...
    I'm really confused with why it cannot be executed properly even though in the newest version.No more stuff I can find to solve the problem now.Maybe I'll test it another day.
 

Percona-Tookit工具包之pt-ioprofile的更多相关文章

  1. Linux后台开发工具箱

    https://files-cdn.cnblogs.com/files/aquester/Linux后台开发工具箱.pdf 目录 目录 1 1. 前言 3 2. 脚本类工具 3 2.1. sed命令- ...

  2. Mysql: pt-table-checksum 和 pt-table-sync 检查主从一致性,实验过程

    一.安装 percona 包 1.安装仓库的包 https://www.percona.com/doc/percona-repo-config/yum-repo.html sudo yum insta ...

  3. Linux后台开发工具箱-葵花宝典

    Linux后台开发工具箱-葵花宝典 一见 2016/11/4 目录 目录 1 1. 前言 4 2. 脚本类工具 4 2.1. 双引号和单引号 4 2.2. 取脚本完整文件路径 5 2.3. 环境变量和 ...

  4. 推荐几款MySQL相关工具

    前言: 随着互联网技术的不断发展, MySQL 相关生态也越来越完善,越来越多的工具涌现出来.一些公司或个人纷纷开源出一些不错的工具,本篇文章主要介绍几款 MySQL 相关实用工具.提醒下,这里并不介 ...

  5. [知识库分享系列] 二、.NET(ASP.NET)

    最近时间又有了新的想法,当我用新的眼光在整理一些很老的知识库时,发现很多东西都已经过时,或者是很基础很零碎的知识点.如果分享出去大家不看倒好,更担心的是会误人子弟,但为了保证此系列的完整,还是选择分享 ...

  6. SQL慢查询安装过程

    SQL慢查询 基本操作 打开防火墙 firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd --reload 安 ...

  7. 快速安装Percona pt工具

    yum install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-Time-HiRes perl-IO-Socket-SSLwget http://pk ...

  8. Percona 工具包 pt-online-schema-change 简介

    mysql的在线表结构修改,因为低效和阻塞读写.一直被诟病.至于ALTER TABLE 的原理,参看我上一篇文章.MySQL在线修改大表结构.看完后,发现的问题是还是会锁的,且对于在线更新的这块也是不 ...

  9. 安装percona工具包

    1.安装percona源 sudo yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona- ...

  10. percona pt toolkit 总结

    ##=====================================================##pt-osc之工作流程:1.检查更改表是否有主键或唯一索引,是否有触发器2.检查修改表 ...

随机推荐

  1. mysql三-1:理解存储引擎

    一.什么是存储引擎 mysql中建立的库===>文件夹 库中建立的表===>文件 生活中我们用来存储数据的文件有不同的类型,每种文件类型对应各自不同的处理机制:比如处理文本用txt类型,处 ...

  2. php基础--取默认值以及类的继承

    (1)对于php的默认值的使用和C++有点类似,都是在函数的输入中填写默认值,以下是php方法中对于默认值的应用: <?phpfunction makecoffee($types = array ...

  3. Format - Numeric

    1. 一些常用格式,参考链接:http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx ; Console.WriteLine(v ...

  4. java实现链表结构详细代码

    一.数据准备 1. 定义节点 2.   定义链表 1.数据部分 2.节点部分 class DATA //数据节点类型 { String key; String name; int age; } cla ...

  5. 浅谈SQL Server中的事务日志(五)----日志在高可用和灾难恢复中的作用

    简介 日志的作用是保证持久性和数据一致性,通过日志可以实现数据的Undo与Redo,因此通过日志,SQL Server不仅仅可以实现灾难恢复,还可以通过日志的Redo来实现高可用性.本篇文章主要讲述日 ...

  6. 【java开发系列】—— Tomcat编译报错

    由于之前Eclipse里面有一个可移植性的web工程,但是在我很久没用后,再次登录这个IDE的时候就发现了问题. 首先,我的电脑里面有两个版本的JDK,1.6和1.7.两个版本的Tomcat6和7以及 ...

  7. 原文:I don’t want to see another “using namespace xxx;” in a header file ever again

    http://stackoverflow.com/questions/5849457/using-namespace-in-c-headers http://stackoverflow.com/que ...

  8. JZ2440学习笔记之通过J-Link单步裸机程序(Keil+J-Link)

    我们还是使用JZ2440学习笔记之第一个裸机程序(Keil-MDK)里面的程序,但是把延时拿掉,要不然单步的时候一直在delay里面: int main(void) { // Set GPF4/5/6 ...

  9. POJ 3621 Sightseeing Cows 【01分数规划+spfa判正环】

    题目链接:http://poj.org/problem?id=3621 Sightseeing Cows Time Limit: 1000MS   Memory Limit: 65536K Total ...

  10. 如何删除anaconda

    因为实验室电脑之前装tensorflow是用的anaconda装的,导致现在用pip装tensorflow1.0装上了却还是用的annaconda下的tensorflow0.8,所以想删除anacon ...