iostat and pidstat — which disk is busy and which process loads it
cheat sheet · sysstat 12.6 · Ubuntu 24.04 https://lab.dimsanych.ru/en/wiki/pidstat-iostat/Cheat sheet
-
iostat -dxsy 1 5disks: tps, kB/s, await, aqu-sz, %util -
iostat -x vda 1 3all fields of one disk -
sudo pidstat -dl 1 5who reads and writes, full command -
pidstat -u 1 5CPU per process, %wait -
pidstat -r 1 5memory and page faults per process -
pidstat -d -p 1151 1 5one process -
ionice -p 1151the process's disk priority class -
sudo ionice -c3 -p 1151let others use the disk first (idle)
Options
The main options of both commands are in the table below, in the groups
iostat and pidstat. The full list is in man iostat and man pidstat.