Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I m not looking to kill a zombie process.

I m looking to avoid the display of zombie process in the ps command.

Are there an option to add to ps command inorder to avoid displaying the zombie process in the ps output. If not is it possible to do it with grep or sed?

share|improve this question
add comment

migrated from stackoverflow.com Jun 6 '13 at 16:22

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

"ps" arguments might differ from implementation to implementation, but for some common ones:

ps auxwww | grep -v " Z "

or

ps -u <username> -o pid,stime,s,args | grep -v " Z "
share|improve this answer
add comment

I like this one:

ps aux | awk '$8=="Z" { print $0 }'

Though you didn't mention awk...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.