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.

New Articles

Incoming Search Terms for the Article

linux find zombie - find orphaned processes unix - search for frozen processe - linux why does a PPID change to 1 - how to identify a orphan process - kill Frozen Process in unix - example of orphan process in linux - linux orphaned processes - frozen processes in unix - how to find all processes without ppid - linux orphan process - linux parent process - linux check zombie - ppid linux - what is in linux orphan - how to check frozen processe - how to kill orphan processes - linux orphan pid - linux parent process terminates - list orphan process linux - find orphanned process unix - how to detect an orphan process - how to see a orphan process - linux semaphores orphan - find linux ppid - how to find ppid - linux detect hanging process - linux ppid - How to detect orphaned processes in Linux - linux prevent orphan processes - linux find orphan processes - linux list zombie processes - orphan processes - orphan process in linux - orphan process -