Where to start First steps track · 15 stages
Linux Labs

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 5 disks: tps, kB/s, await, aqu-sz, %util
  • iostat -x vda 1 3 all fields of one disk
  • sudo pidstat -dl 1 5 who reads and writes, full command
  • pidstat -u 1 5 CPU per process, %wait
  • pidstat -r 1 5 memory and page faults per process
  • pidstat -d -p 1151 1 5 one process
  • ionice -p 1151 the process's disk priority class
  • sudo ionice -c3 -p 1151 let 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.

Loading…