Reputation: 25
I'd like to find all processes running on Unix (Solaris) with a certain PPID. Is this possible using the ps
command?
Upvotes: 1
Views: 4565
Reputation: 11
On Solaris 5.10:
For the current process
ps -o ppid -p $$
For a process with PID 12345
ps -o ppid -p 12345
Upvotes: 1
Reputation: 191
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.
Upvotes: 0
Reputation: 10190
On Ubuntu (12.04 at least) you can use the --ppid
option. E.g.
ps --ppid 1234
Upvotes: 1