Skip to main content
2 of 4
edited title
John
  • 1.2k
  • 1
  • 10
  • 26

how to find non responsive binaries using `ps`

I want to run a command using ps to find non responsive applications.

This stack question has a response which I've tried to implement, but I am getting odd results from it.

ps aux | awk -F' ' '{ if ( $8="D" ) print $0 }'

This is supposed to return only the lines from ps where column 8 has the letters "D". What I am seeing is that it's replacing column 8 with the letter D instead.

I have tried on zsh and bash, using gawk instead of awk, and getting the same result. what is wrong with this command?

I am not sure I can even get the result I am looking using this command but I am still interested in why it's failing.

John
  • 1.2k
  • 1
  • 10
  • 26