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.
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/
iotop是一款基于Python的命令行工具,具有类似于top的用户界面,用于监控Linux系统中各进程的I/O活动情况。该工具适用于Linux内核版本2.6.20及以上,并且需要配置选项包括TASK_DELAY_ACCT、CONFIG_TASKSTATS、TASK_IO_ACCOUNTING和CONFIG_VM_EVENT_COUNTERS。本文介绍如何在Ubuntu 10上安装和使用iotop。

447

被折叠的 条评论
为什么被折叠?



