With top
it's easy to find out how much CPU each job uses. However, I want to hunt down a job that causes a high wait CPU. Is there a way to find out which jobs are blocked on I/O?
Run the iostat command without any option will display the information about CPU utilization, device utilization, and network file system utilization. Use the -c option to break the CPU utilization into user processes, system processes, I/O wait, and idle time.
Use ps Command to Find Top Processes by Memory and CPU Usage You can use the ps command with –sort argument to sort the output by memory and CPU usage.
A high waiting time indicates that the CPU is *stranded* because of the I/O operations on that device. For optimal performance, one should aim to keep the I/O waiting CPU time as low as possible. If waiting time is > 10%, then it is worth investigating it.
To sort all running processes by CPU utilization, simply press Shift+P key.
The processes blocked on IO are the ones marked as D
in the status column (S
column in top).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With