Find Out Linux Orphan Processes

It’s very important of terminating Linux processes in a proper way to avoid Linux hangs up without any trail in system log file. In short, Linux will hangs up without telling reasons in system log, when the master process (init, PID 1) becomes overloaded by too many orphan processes in a one go.

Having say that, a normal user who has access to your Linux server is possible to easily kill your Linux server in a minute!

How could we able to detect and find out a runaway process or orphan process? There is a discussion on zombie VS orphan process, the orphan processes are identified as

non-system processes or user’s processes that are having PPID (parent process ID) of 1 (init process ID), via a mechanism known as re-parenting.

There are not much processes owned by init process. Apparently, most of the system processes that are running after system boots up are having PPID 1.

So, soon after Linux system boots up, you can run this command

ps -elf | head -1; ps -elf | awk ‘{if ($5 == 1) {print $0}}’

to snapshot all the processes with PPID 1. Keep that result. Thereafter, you may periodically run the command to compare the result of the time with snapshot taken earlier. Any differences found in the new snapshot might be potentially being orphan processes.

Note, the differences found are only suggest that they’re potential (not confirm) orphan processes in Linux system. You have to get more info to confirm them before terminating those processes. For example, how STIME figure, CPU utilization, understanding its purpose of executing, etc.

Once you have confirm them, you should not hesitate to terminate them as soon as possible, by the kill -9 command, as orphan processes will drain out your Linux system resources over the time.


Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

linux orphan process - orphan process in linux - LInux get parent process - orphan process - orphan state in linux - linux finding orphan process - example of orphan state in linux - how to change ppid linux - identify orphan process linux - linux+orphan - linux how to check orphan processes - change ppid in linux - kill process linux ppid - linux detect zombie grandchildren - linux orphan - log process reparenting linux - orphan state of a process in linux - orphan zombies - detect zombie process - how to identify orphan process linux - orphans in linux - ppid 1 - ps ppid linux - linux detect process hangs ps aux - orphan linux - orphan process linux - orphan in linux - killing orphaned processes linux - linux list frozen processes - linux,orphan file - linux detect zombie process - linux command for identifying Zombie - process linux "change ppid" - removing orphaned process - how to clear orphaned processes linux - linux detect zombie processes - orphan process init - orphaned processes reparent - zombie and orphan process difference - kill orphan processes - linux ppid - linux process orphan adopt terminal - linux orphans - orfaned process linux - orphan processes - what is the command which kill orphan process in linux - how to identify orphan unix processes - how to find processes with PPID 1 - linux kill orphaned processes - linux process kill orphan -