lkml.org 
[lkml]   [2000]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: /proc/nzombies

    Various people:

    > ps ax | grep -c '<zombie>'
    > ps ax | grep -c '<z[o]mbie>'
    > ps acx | grep '<defunct>'
    > ps acx | awk '$6 == "<defunct>"'

    You can ask ps for what you want:

    ps -eo s | grep -c Z # Linux and Solaris
    ps -eo state | grep -c Z # Linux and every UNIX except Solaris
    ps axo state | grep -c Z # Linux, Tru64, AIX, and some non-UNIX crap

    Jos Visser writes:

    > The following is wrong with it:
    >
    > 1) It is too slow

    Too bad. For nearly everyone, a fast exit() is far more important.

    > 2) It is not full (fool) proof

    With my changes it is very reliable.

    > 3) It takes too much resources to execute very often in
    > a monitoring system that you want to be non-intrusive

    "Doctor, it hurts when I do this." --> "Don't do that."
    (poll less often, or just don't make zombies)

    > 4) It is Linux distribution dependent (ps flags)

    You can upgrade ps.

    > 5) It is somewhat unwieldy from a C program

    Too bad. For nearly everyone, a fast exit() is far more important.


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.026 / U:32.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site