Is there a linux command that allows you to see a processes IO wait time vs. CPU time? I'm trying to see whether some processes are IO-bound or CPU-bound.

link|improve this question

47% accept rate
feedback

5 Answers

up vote 5 down vote accepted

I think iostat is the basic tool you want.

link|improve this answer
Handy tip... "iostat 30" will give you overall stats on startup, then update every 30 seconds with activity from the last 30 seconds. The initial display will give you a snapshot of overall IO usage, and the regular update will indicate whether the system is IO bound now. – Jim OHalloran May 15 '09 at 0:28
feedback

Have a look at iotop.

link|improve this answer
feedback

If you install the atsar package you can look at the system's CPU and I/O stats. Simply using top should give let you know if the a particular process is CPU or memory bound. I am not sure how you see the I/O stats for a particular process.

link|improve this answer
feedback

top (1) will show this information. You can specify a particular process ID with -p.

link|improve this answer
feedback

Try mpstat and look at %iowait.

[pdurbin@beamish ~]$ mpstat 1 5
Linux 2.6.18-128.1.10.el5 (beamish)    05/14/2009

03:25:27 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
03:25:28 PM  all    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00   1073.00
03:25:29 PM  all    0.25    0.00    0.50    0.00    0.00    0.25    0.00   99.00   1202.00
03:25:30 PM  all    1.50    0.00    0.00    0.00    0.00    0.00    0.00   98.50   1071.00
03:25:31 PM  all    0.25    0.00    0.00    0.00    0.00    0.00    0.00   99.75   1150.00
03:25:32 PM  all    0.25    0.00    0.00    0.00    0.00    0.00    0.00   99.75   1086.00
Average:     all    0.45    0.00    0.10    0.00    0.00    0.05    0.00   99.40   1116.40
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.