Linux 下的I/O性能分析 iotop

Linux has always been able to show how much I/O was going on (the bi and bo columns of the vmstat 1 command).

Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on. It requires Python ≥ 2.5 (or Python ≥ 2.4 with the ctypes module) and a Linux kernel ≥ 2.6.20 with the TASK_DELAY_ACCT CONFIG_TASKSTATS, TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on.


Screenshot

Download

Iotop is licensed under the terms of the GNU GPL.

The latest version is Iotop 0.4.2 (NEWS), available here: iotop-0.4.2.tar.bz2 or iotop-0.4.2.tar.gz.

Freshmeat project page to stay informed: http://freshmeat.net/projects/iotop.

Git repository hosted on repo.or.cz. To get a snapshot of iotop with a complete history, use the following command:

git clone git://repo.or.cz/iotop.git 
 
----------------------------------------------------- 
 

     

Linux下的IO统计工具如iostat, nmon等大多数是只能统计到per设备的读写情况, 如果你想知道每个进程是如何使用IO的就比较麻烦.
当然如果你会systemtap, 或者blktrace这些事情难不到你, 但是没专用工具总不是很舒服的. 幸运的是Linux 2.6.20内核以后提供了基于每个进程的IO记账功能,所以就有了类似iotop这样方便的工具.

官网地址: http://guichaz.free.fr/iotop/

Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on.

在RHEL6或者ubuntu下使用就非常简单, 我简单的演示下ubuntu10下使用:
安装先:
$ apt-get install iotop

直接运行就好:
$iotop

 

 

--------------------------------------------

 

 

下面来说一具体运用:

 

可以用左右箭头操作,按 r 是相反方向,按 o 是动态切换

用法 iotop -参数

–version 查看版本信息的

-h, –help 查看帮助信息的

-o, –only 只显示在划硬盘的程序
-b, –batch 批量处理 用来记录日志的

-n NUM  设定循环几次

-d SEC, –delay=SEC  设定显示时间间隔

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-690314/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-690314/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值