Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

5 Answers

up vote 5 down vote accepted

I think iostat is the basic tool you want.

share|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
add comment

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
share|improve this answer
add comment

Have a look at iotop.

share|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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