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

I'm not asking how to find out where a bottleneck is. I just what to know how to check if the harddrive is being used at its limit (and hence causing a bottleneck).

Something like top where I can see a usage percentage of CPU and RAM.
Is there something like that with which I can monitor harddrive activity?

Native linux tools preferred.

share|improve this question

9 Answers 9

up vote 12 down vote accepted

Take a look at:

share|improve this answer

You want the sysstat utilities: iostat and sar are what you'll find most useful, I think.

iostat will give you current stats. sar will grab and store and show you historical stats.

Also possibly useful is iotop, which is like iostat but ties things to PIDs. It's newer though, and I don't know as much about it.

share|improve this answer

You already mentioned top. It's useful enough to give you a simple realtime figure.

Check the %wa counter on the CPU line near the top of the screen. It tells you the percentage of time the CPU currently spends waiting on I/O. This should be close to zero.

share|improve this answer

I'm a huge fan of iostat for watching disk activity on the console. You'll be able to see the IOPs being service by the drive, throughput, it's utilization %, request wait time and more. If you are seeing high wait, service and utilization that'll be the give away.

share|improve this answer

Another tool that will allow you to see disk activity (among other things) on Linux (or AIX) is nmon. It will display either a table or a bar graph and shows both per-partition and per-device data.

share|improve this answer
    
+1 I didn't know nmon. Nice! –  Marco Ramos May 28 '10 at 1:18

sar is the answer. Its gathers statics on queue length, request response time, etc. You can run it interactively, or even better run it in the background and analyze the data later.

share|improve this answer

iostat (or nmon which also displays the same stats in a different format) is good to get a system level diagnostic there are other tools which are more fine grained if you need it. I was recently introduced to blktrace/blkparse which came with the OS and will record and strace like level of detail about every IO request from every part of the system. You can record number and size of IO requests per process, including kernel processes like swap and filesystem journaling, as well as latency.

share|improve this answer

personally I find sar and iostat too verbose to be of value to me. they take multiple lines out output and are very difficult to view (my opinion). try collectl! same data and more, but much easier to read the output. -mark

share|improve this answer

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.