Hello list,
Do you have ideas how to effectively look for the pid of a parent
process. My objective is to create a script capable of a pid lookup
and can kill a certain parent process with `kill <pid>`.
Try "ps axf" or "ps -eFH". Scroll though the listing and look for the processes that you want. You can see the pids of the parent along with the children, for example:
2946 ? Ss 0:03 /usr/sbin/httpd
16747 ? S 0:00 \_ /usr/sbin/httpd
16748 ? S 0:00 \_ /usr/sbin/httpd
3997 ? S 0:00 \_ /usr/sbin/httpd
You see right away that 2946 is the parent's pid while 16747, 16748, and 3997 are the children.
-bodgie
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

