2

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?

Phil Frost
  • 637
  • 5
  • 18
Anthony Miller
  • 457
  • 3
  • 6
  • 19

2 Answers2

11

PSR column in output of :

ps -eLF

will show you PIDs on each core.

tonioc
  • 1,017
  • 8
  • 11
  • Thanks! The accepted answer with iotop did not help in my case (a stuck NFS mount), but this answer did, combined with awk to filter by core number: `ps -eLF | awk '$9 == 4'` – Onnonymous Jan 03 '22 at 10:01
4
  • 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"