Find processes by parent PID on Solaris

4.3k views Asked by At

I'd like to find all processes running on Unix (Solaris) with a certain PPID. Is this possible using the ps command?

3

There are 3 answers

0
bwinata On BEST ANSWER

Alternatively, you could always perform a grep on the output of the process list;

ps -ef | grep XXXX, where XXXX is your PPID.

This will at least give you a list of processes with that number, and knowing that PPID should be the third column, lead you to your specified Parent Process ID.

0
jvs On

On Solaris 5.10:

For the current process

ps -o ppid -p $$

For a process with PID 12345

ps -o ppid -p 12345

4
DanielGibbs On

On Ubuntu (12.04 at least) you can use the --ppid option. E.g.

ps --ppid 1234