Sample Header Ad - 728x90

How do I filter by STAT with ps?

7 votes
3 answers
7555 views
I am trying to get all the processes for which the value corresponding to the STAT column is X. I have done this using awk
ps -aux | awk {'if ($8 ==  "S") print $8" "$11'}
However, I would like to do it without using a program other than ps. Is there a way?
Asked by edoreld (173 rep)
Mar 10, 2017, 03:56 PM
Last activity: Dec 19, 2024, 02:33 PM