How many tasks have you waiting on I/O

on October 9th, 2016 by Hades | No Comments »

Sometime you can see the high load average and low cpu usage.
Probably tasks waiting for I/O – that’s quite a bit of swap in use:

Try this to find out how many tasks you have (probably) waiting on I/O:

top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}'