Perl parsing ps fwaux output

Posted by Magic Hat on Stack Overflow See other posts from Stack Overflow or by Magic Hat
Published on 2010-06-14T17:31:04Z Indexed on 2010/06/14 17:32 UTC
Read the original article Hit count: 138

Filed under:

I am trying to figure out children processes of a given parent from ps fwaux (there may very well be a better way to do this). Basically, I have daemons running that may or may not have a child process running at any given time. In another script I want to check if there are any child processes, and if so do something. If not, error out.

ps fwaux|grep will show me the tree, but I'm not exactly sure what to do with it. Any suggestions would be great.

© Stack Overflow or respective owner

Related posts about perl