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. 数组和矩阵(3)——Next Greater Element I

    https://leetcode.com/problems/next-greater-element-i/#/description You are given two arrays (without ...

  2. mysql 字符串转换呈毫秒值

    SELECT CEIL((UNIX_TIMESTAMP('2011-05-31 23:59:59') - UNIX_TIMESTAMP('2011-05-31 00:59:59'))/1000/60/ ...

  3. H5新特性-----type=file文件上传

    1.语法 单文件上传:<input type="file" id="file1"/> 多文件上传:<input type="file ...

  4. matlab练习程序(弧形、圆柱投影的复原)

    前一段介绍了从矩形图像到圆柱的正向投影,看这里和这里.今天介绍如何从已经投影的图像反映射到原图像上. 本来此种变换一定是需要数学公式的,不过这里只是用了一个很简单的方式来完成反映射. 具体就把每一列有 ...

  5. ul标签在FF中默认只有padding值(即:padding-left:40px)

  6. ORACLE_PROCEDURE_DROPTABLE

    WEBSITE:https://stackoverflow.com/questions/14564641/drop-a-table-in-a-procedure Qusetion:Hou to use ...

  7. MATLAB安装与注册(血泪总结)

    工具/原料   R2016a_win64.iso(安装文件) Matlab 2016a Win64 Crack.rar(破解文件) 方法/步骤   1 下载R2016a_win64.iso(安装文件) ...

  8. sql语句更新某字段内容中部分数据

    使用到的sql 语句的关键字就是replace, 如下图,把带有zhangjun 的值替换成 user 使用的sql语句就是 update 表名 set 字段名=replace(字段名,‘替换字符内容 ...

  9. Arcgis for Android 空间数据WKT与JSON描述

    点线面数据标准格式 一. 点 WKT: POINT(-118.4 -45.2) JSON: { "x": -118.4, "y": -45.2, "s ...

  10. POJ 2531 深搜剪枝

    题意:全局最大割. 分析:有相应的算法,数据量很小,可以枚举源点,汇点,最大流. 这里用DFS,状态定义:分成两个集合,刚开始S集合全部点,然后一个一个放,这是一个回溯的过程. 没剪枝也过了. 剪枝技 ...