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. 集合异常之List接口

    List接口介绍:是Collection接口中的子类, 特点: l  它是一个元素存取有序的集合.例如,存元素的顺序是11.22.33.那么集合中,元素的存储就是按照11.22.33的顺序完成的).( ...

  2. H5新特性监听手机的返回键

    var hiddenProperty ='hidden' in document ? 'hidden' :'webkitHidden' in document ? 'webkitHidden' : ' ...

  3. arcengine自己做一个工具Tool放到工具箱中

    // Copyright 2010 ESRI // // All rights reserved under the copyright laws of the United States // an ...

  4. win7下tomcat5.5无法通过ip和127.0.0.1访问的解决方法

    解决办法:找到tomcat5.5目录下的conf\server.xml文件,原文如下: <Connector port="8080" maxHttpHeaderSize=&q ...

  5. Windows C/C++ 内存泄露检测

    #pragma once #define _CRTDBG_MAP_ALLOC #include<crtdbg.h> #include<stdlib.h> #include< ...

  6. CentOS 7 使用 yum 安装 jdk 1.8

    安装之前先检查一下系统有没有自带open-jdk 命令: rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep gcj 如果没有输入信息表示没有安装. ...

  7. 再学UML-UML用例建模解析(二)

    (1) 关联关系 关联关系是指执行者与用例之间的关系,又称为通信关系,如果某个执行者可以对某个用例进行操作,它们之间就具有关联关系,如下图所示,“经理”有一个功能为“查看库存报表”,因此可以在执行者“ ...

  8. WP模拟器修改语言为中文方法

    对于WP7模拟器来说默认启动时显示的语言为英文,除了操作界面外,如果你的应用支持多国语言必须修改为中文才能显示正确的界面.下面Zune123将WP7 Emulator修改语言为中文的方法写个简单的教程 ...

  9. 每天一个linux命令:df 命令

    linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况.可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息. 1.命令格式: df [选项] [文件] 2.命 ...

  10. SSH 本地和服务器传输

    [转]https://www.cnblogs.com/magicc/p/6490566.html SCP 使用方式如下: 1.上传本地文件到服务器 scp /path/filename usernam ...