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. Celery-------周期任务

    在项目目录例子的基础上进行修改一下celery文件 from celery import Celery from celery.schedules import crontab celery_task ...

  2. dataBinding与ListView及事件

    2015年Google IO大会分布了DataBinding库,能够更快捷便利的实现MVVM结构模式.但是,通过对DataBinding的学习,其中踩过得坑,今天要在这里记录一下.对于DataBind ...

  3. css浮动布局小技巧

    父元素如何围住浮动的子元素的三种办法: 一.为父元素应用overflow:hidden. overflow真正用途是防止包含元素被大的内容撑开,设定了宽度之后,包含元素将超过容器的内容减掉:而它还有另 ...

  4. UITableViewCell 分割线如何满屏

    在iOS7中,UITableViewCell左侧会有默认15像素的空白.设置setSeparatorInset:UIEdgeInsetsZero 能将空白去掉. 但是在iOS8中,设置setSepar ...

  5. 【IOS】IOS综合

    取精华.去糟粕!适合iOS开发者的15大网站推荐 E:/IOS视频: IOS基础/01 苹果开发零基础教程 3780m --> 63h /02 IOS开发快速入门教程 /03  IOS开发进阶教 ...

  6. 【HTML5】HTML5 综合

    HTML5教程: 视频教程:http://www.socss.cn/html5视频教程大集合/ DCloud关于HTML5:http://ask.dcloud.net.cn/docs 开发工具:HBu ...

  7. C语言学习之第一个程序

    #include<stdio.h> int main() { printf("This is my first program!\n"); ; } 基本格式大致如下: ...

  8. django视图函数解析(三)

    1 视图views概述 1 作用: 视图接受web请求并响应web请求 2 本质: 视图就是python中的处理函数 3 响应: 一般是一个网页的HTML内容.一个重定向.错误信息页面.json格式的 ...

  9. 7 - py面向对象一条龙服务

    Python从设计之初就已经是一门面向对象的语言,在python里所有东西皆是对象. 下面通过一个实例来说明什么是面向对象. 引子 你是一家公司的员工,公司现在要开发一款“人狗战争”的游戏,人狗战争肯 ...

  10. YouTube 1080P高清视频下载方法

    在国内在线视频网站还停留在1080P蓝光的时候,YouTube早已经支持4K和8K分辨率的极清视频.虽然4K和8K的清晰度比1080P高了许多档次,但是大部分人的电脑播放4K视频还是很卡的,所以目前来 ...