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. Cocos2d-js 开发记录:自定义按钮

    游戏开发总是有些特殊,一般的预制的UI无法满足要求.其实对于不复杂的功能,与其看文档还不如自己写一个.比如游戏中一个虚拟键盘,其中的按键在按下时会增长,变为原来的两倍高度,在原来高度上方显示按键的字如 ...

  2. python大数据

    http://blog.csdn.net/xnby/article/details/50782913 一句话总结:spark是一个基于内存的大数据计算框架, 上层包括了:Spark SQL类似Hive ...

  3. 最新一道面試題目,input: int[1,1,2,2,2,3,3,3],output [3,2,1],要求按照數字出現的次數從多到少排列元素。

    面試當時沒有及時答出來,感覺當時在面試官的提示下跑偏了.想用兩個數組來mapping key和value然後對等排序,但是因為面試官讓用Array.sort而沒想好有什麼好辦法,結果可想而知.但是題目 ...

  4. asyncio标准库4 asyncio performance

    性能包括2部分 每秒并发请求数(Number of concurrent requests per second) 每秒请求负载(Request latency in seconds: min/ave ...

  5. 使用 richtextbox 输出程序运行信息

    private delegate void Refresh_CallBack(Color color,string text); private void ControlsRefresh(Color ...

  6. 再学UML-深入浅出UML类图(二)

    类与类之间的关系(1) 在软件系统中,类并不是孤立存在的,类与类之间存在各种关系,对于不同类型的关系,UML提供了不同的表示方式.       1. 关联关系 关联(Association)关系是类与 ...

  7. Python——追加学习笔记(四)

    函数 1.python里的函数可以返回一个值或者对象,知识在返回一个容器对象的时候有点不同,看起来像是能返回多个对象. >>> def bar(): ... return 'abc' ...

  8. 一、Python安装下载

    下载地址:https://www.python.org/downloads/ 因为Python3.X和2.X有部分不兼容,有些不向下兼容,现在3.5的资料和插件少,故我就学习的2.7.11了; 下载后 ...

  9. March 4 2017 Week 10 Saturday

    There is more to life than increasing its speed. 生活不仅仅是匆匆赶路. I always think I have walked very slowl ...

  10. SAP成都研究院许聚龙:Hello, Coresystems!

    Jerry的前一篇文章<SAP成都研究院数字创新空间沟通S/4HANA和C/4HANA的智能服务演示视频和Coresystems分享预告>已经提到,接下来会由SAP成都研究院数字创新空间的 ...