Tag: Technology

  • Defunct Processes

    What is a defunct process ?

    A defunct (or zombie) process is one whose exit status has yet to be reaped by its parent. The exit status is reaped via the wait(2), waitid(2), or waitpid(2) system call. In the normal course of system operation, zombies may occur, but are typically short-lived. This may happen if a parent exits without having reaped the exit status of some or all of its children. In that case, those children are reparented to PID 1. See init(1M), which periodically reaps such processes.

    An irresponsible parent process may not exit for a very long time and thus leave zombies on the system. Since the operating system destroys nearly all components of a process before it becomes defunct, such defunct processes do not normally impact system operation. However, they do consume a small amount of system memory.

    preap will attempt to prevent the administrator from unwisely reaping a child process which might soon be reaped by the parent, if:

    • The process is a child of init (1M).
    • The parent process is stopped and might wait on the child when it is again allowed to run.
    • The process has been defunct for less than one minute.

    preap should be applied sparingly and only in situations in which the administrator or developer has confirmed that defunct processes will not be reaped by the parent process. Otherwise, applying preap may damage the parent process in unpredictable ways.

    Killing defunct (zombie) processes on Solaris – preap and orphan processes with init(1M)

    A defunct (or zombie) process is one whose exit status has yet to be reaped by its parent. So when a process shows as “defunct” in ps, you need to reap it. Here’s how:

    preap(1) – force a defunct process to be reaped by its parent

    Syntax: /usr/bin/preap PID

    So, to get rid of all zombies on our system, all we have to do is script this to real all process marked as defunct:

    /usr/bin/preap $(ps -ef | grep defunct | awk ‘{ print $2 }’ | xargs)

    So, what’s an orphan process then? If the parent of a defunct process happens to exit, it becomes an orphan, and is asigned PID 1 as a parent – see init(1M).

    Read more on zombies, defunct processes, orphans, preap and init here.

  • Google…..

    While browsing the net today, i encountered with a beautiful innovation by google that really impressed me on the workings on google, how it can be helpful in understanding the trends what we are actually following and people with interest in making money from web can know how and what to be put on the web to make people visit more.

    The word is zeitgeist.

    It is a German Word which is come from two words Zeit (Time) + Geist(Spirit) coined in the year of 1884 and literally means “The general intellectual, moral, and cultural climate of an era.”

    Its known from the years that we were always interseted in the cultural and geographical diversity of the other parts of the world and our zeal to know about these parts have bought us to a point where we can come together and share the knowledge of the socitey we lived in, which in turn benefitted in knowing the culture we do not know now and probably will never even get a chance to experience it. The web, has bought us together and zeitgeist is one such initiative by google.

    It is really amusing to see how diverse people are and what kind searches they make in their day to day life to get support.