disk utilization

Steven Heimann steven at heimann.com.au
Tue May 15 21:30:16 UTC 2007


> On 5/15/07, Steven Heimann <steven at heimann.com.au> wrote:
>         I am looking for a utility a little like iostat except that I
>         am trying
>         to find out which processes are causing the disk reads and
>         writes.
>         


In reply On Tue, 2007-05-15 at 15:37 +0200, Ben Brick wrote:
> This will get you started:
>  ps -eo state,pid,args,wchan | grep ^D

Thanks Ben.  This seems to look for state "D" which man ps says is
Uninterruptible sleep (usually IO).  I have run that command many times
without finding any commands showing state D.  ( I had to change it
slightly because grep was looking for the "^" rather than using it as a
beginning of line)

However, my disk is rattling fairly constantly and an example of the
output from iostat 2 /dev/sda shows the following:

Linux 2.6.17-11-generic (steven-hm.hfg)         05/16/2007
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.89    0.06    1.32    0.15    0.00   95.58
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               1.81         7.85       202.57   11535499  297725776
sda               0.00         0.00         0.00          0          0
sda               1.99         0.00       131.34          0        264
sda              16.42         0.00       159.20          0        320
sda               2.00         0.00        64.00          0        128
sda               0.00         0.00         0.00          0          0
sda               0.00         0.00         0.00          0          0
sda               2.50         4.00        64.00          8        128
sda               0.00         0.00         0.00          0          0
sda               0.99         0.00         7.92          0         16
sda               1.00         0.00        59.70          0        120
sda               0.00         0.00         0.00          0          0
sda               2.00         0.00        64.00          0        128

vmstat shows no paging (see following)

steven at steven-hm:~$ vmstat 2
procs -----------memory---------- ---swap-- -----io---- -system--
----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy
id wa
 0  0 207604 1587892  94264 502860    0    0     2     7    8    2  3  1
96  0
 0  0 207604 1587932  94268 502856    0    0     0    36  352 2473 24 15
60  0
 0  0 207604 1587932  94268 502856    0    0     0     0  350 2464 24 16
60  0
 1  0 207604 1587932  94280 502844    0    0     2    22  358 2455 23 16
61  0
 0  0 207604 1587924  94280 502844    0    0     0     0  350 2732  1  0
99  0
 2  0 207604 1587924  94280 502844    0    0     0     0  355 2650  5  5
90  0
 1  0 207604 1587800  94284 502840    0    0     0    24  351 2659 21
16 

Something is definitely going on but I can't see what it is.

I would appreciate any suggestions as to how to track it down.

Thank you and regards
Steven




More information about the ubuntu-users mailing list