How to get I/O usage by process in Unix?

10,679

Try program called "iotop". It shows usage of local disk drives in similar way than "top" for CPU usage. For network traffic there's a tool called "iftop".

Also, if you are uncertain about why the load is high, look at the "IO Wait" column on "top" view. If the CPU time mainly goes to "user" or "system" work, then it's CPU that's the bottleneck, if "IO wait", then disk. Also worth looking are swap numbers - if the physical memory has less than 5% free and/or lot of swap file is used, you might be limited by physical memory.

For example:

top - 17:18:37 up 1 day,  5:20, 19 users,  load average: 0.18, 0.26, 0.35
Tasks: 249 total,   2 running, 246 sleeping,   0 stopped,   1 zombie
Cpu(s):  8.5%us,  2.1%sy,  0.3%ni, 85.4%id,  3.7%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   8183668k total,  8082464k used,   101204k free,    11148k buffers
Swap: 11847900k total,   248528k used, 11599372k free,  3361444k cached

"us" stands for userspace code, "sy" for system, "id" for idle, "wa" for IO wait.

Share:
10,679

Related videos on Youtube

samarth
Author by

samarth

Updated on September 18, 2022

Comments