Linux – Find process causing IO wait time

centoslinuxmulti-coreprocess

mpstat -P ALL shows high %wa time on a single core from an 8 core CPU and I'm trying to figure out what's writing to disk. So how can I figure out what is running on that CPU core?

Best Answer

  • Run iotop and will show processes writing on disk.

Press a in it to top the most greedy process.

enter image description here

  • lsof The following will return a list of all files that are open for writing:**

lsof | grep -e "[[:digit:]]\+w"