[20140707]linux下使用iotop.txt

[20140707]linux下使用iotop.txt

生产系统disk io量很大,并且很慢,像通过os命令了解那个进程存在大量io.使用vmstat,dstat,nmon只能了解大概的情况,不能确定那个
进程.

检查安装包发现iotop可以满足需要,我安装的是centos 6.2.

参数如下:
OPTIONS
       --version
              Show the version number and exit

       -h, --help
              Show usage information and exit

       -o, --only
              Only show processes or threads actually doing I/O, instead of showing all processes or threads. This can be dynamically toggled by pressing o.

       -b, --batch
              Turn on non-interactive mode.  Useful for logging I/O usage over time.

       -n NUM, --iter=NUM
              Set the number of iterations before quitting (never quit by default).  This is most useful in non-interactive mode.

       -d SEC, --delay=SEC
              Set the delay between iterations in seconds (1 second by default).  Accepts non-integer values such as 1.1 seconds.

       -p PID, --pid=PID
              A list of processes/threads to monitor (all by default).

       -u USER, --user=USER
              A list of users to monitor (all by default)

       -P, --processes
              Only show processes. Normally iotop shows all threads.

       -a, --accumulated
              Show accumulated I/O instead of bandwidth. In this mode, iotop shows the amount of I/O processes have done since iotop started.

       -k, --kilobytes
              Use kilobytes instead of a human friendly unit. This mode is useful when scripting the batch mode of iotop. Instead of choosing the most appropriate unit iotop will display all sizes in kilobytes.

       -t, --time
              Add a timestamp on each line (implies --batch). Each line will be prefixed by the current time.

       -q, --quiet
              suppress some lines of header (implies --batch). This option can be specified up to three times to remove header lines.
              -q     column names are only printed on the first iteration,
              -qq    column names are never printed,
              -qqq   the I/O summary is never printed.

常用参数:
iotop -o -u oracle -a -k

其中-a 是累积IO.

这样很容易知道那个进程消耗的IO很大.

#  lsof -i -Pn  | grep

时间: 2024-08-03 19:36:25

[20140707]linux下使用iotop.txt的相关文章

[20121121]关于linux下history命令.txt

[20121121]关于linux下history命令.txt 昨天跟别人聊天,提到linux下history命令带来的安全隐患,主要是一些命令会记录在~/.bash_history中.实际上有许多方法可以使系统不记录这样一些命令,自己也看了一些文档,总结如下: 1.使用环境变量HISTCONTROL. export HISTCONTROL=ignorespace 如果设置HISTCONTROL=ignorespace,这样开头有空格的命令就不会记录.例子: export HISTCONTROL

[20120323]linux下sort排序.txt

昨天要排序一个文件:Ethernet0/1Ethernet0/10Ethernet0/11Ethernet0/12Ethernet0/13Ethernet0/14Ethernet0/15Ethernet0/16Ethernet0/17Ethernet0/18Ethernet0/19Ethernet0/2Ethernet0/20Ethernet0/21Ethernet0/22Ethernet0/23Ethernet0/24Ethernet0/25Ethernet0/26Ethernet0/27Et

linux-Linux下程序从txt中读出的数据为什么不正确?

问题描述 Linux下程序从txt中读出的数据为什么不正确? 我在Linux下进行并行程序的编译和运行,其中有些参数是从txt文档中获取的,但是我发现在程序获取的参数中,有些是正确的,但是有些是错误的,很是不解,请问大家有遇到过这种现象吗?通过查资料,我觉得可能是Linux和Windows下文本的格式不一样,我用dos2unix命令将文本转换为Linux下的格式,读出来依旧和前面一样,费解啊... 解决方案 应该还是读取文件的代码逻辑有问题,没有处理对读取的数据

fortran语言-请教这个fortran脚本怎么用?据说是把txt文件转化成cst文件 linux下怎么操作 谢谢

问题描述 请教这个fortran脚本怎么用?据说是把txt文件转化成cst文件 linux下怎么操作 谢谢 下面是.f文件具体内容 parameter(npointp=900000) real x(900000),y(900000) integer num(900000),linenum(900000),npl(900000),lnum,nplt, * lasti,i,j open(10, file='coastline.txt') open(11, file='coastline.cst')

[20170301]Linux下删除怪异文件名.txt

[20170301]Linux下删除怪异文件名.txt --//这几天一直在测试数据库在线日志损坏,使用备库备用日志的修复试验. --//在测试中不知道为什么在自己的机器中产生许多怪异的文件,主要是文件名怪. --//估计是copy & paste 惹得祸,人在疲惫的情况下很容易犯低级错误.^_^ --//我当时采取方法把正常的文件移动别的目录,然后再删除整个目录的方法,有空测试一下这些文件如何删除. 1.建立测试环境: $ touch ^G $ touch ^V^V $ touch a $ t

[20160921]linux下建立samba服务器.txt

[20160921]linux下建立samba服务器.txt --工作需要,需要在linux下配置samba服务.好久不做这些事情,做一个安装笔记: 1.安装samba软件包 # rpm -qa | grep samba samba-client-3.0.33-3.39.el5_8 samba-common-3.0.33-3.39.el5_8 samba-3.0.33-3.39.el5_8 --注意安装samba-3.0.33-3.39.el5_8需要 perl-Convert-ASN1-0.2

[20130727]linux下使用taskset命令.txt

[20130727]linux下使用taskset命令.txt # rpm -qilf `which taskset`Name        : schedutils                   Relocations: (not relocatable)Version     : 1.4.0                             Vendor: Red Hat, Inc.Release     : 2                             Build

[20130614]linux下删除数据文件的恢复的一些细节问题.txt

[20130614]linux下删除数据文件的恢复的一些细节问题.txt 前天看了链接:http://space.itpub.net/26015009/viewspace-763506 我仅仅做一些测试以及补充,以及注意的细节问题,实际上最好的方法依旧是使用rman备份恢复. 1.测试环境: --session 1 SQL> @ver BANNER --------------------------------------------------------------------------

[20131226]linux下使用pigz高效传输文件.txt

[20131226]linux下使用pigz高效传输文件.txt http://zlib.net/pigz/ pigz, which stands for parallel implementation of gzip, is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data. pigz was