[lkml]   [2000]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/nzombies
"Albert D. Cahalan" wrote:
> 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.

a) Does a nzombies++ add that much to exit()?
b) If we make it a configuratible feature, you can still have a fast

> > 2) It is not full (fool) proof
> With my changes it is very reliable.

Sure, you can make it even more reliable by looking at the 3rd field in
/proc/[1-9][0-9]*/stat. I'm aware about all these features.

> > 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)

"Just don't make zombies" would be nice. However, the purpose of system
monitoring (for which I proposed the feature) is to try and see if
somebody *does* make zombies: e.g. a home-grown or OSS application that
I can change, or a 3rd party application that I need to bug the vendor

> > 4) It is Linux distribution dependent (ps flags)
> You can upgrade ps.

I can, so can you, and probably everybody else on this list. But there
are a lot of users who can not, will not or do not want to. And on the
side, it might break other scripts or features. It is just not up to me
to go into a customer site and start upgrading these kind of programs,
thereby imposing an administration burden to upgrade ps in future
installations as well.

> > 5) It is somewhat unwieldy from a C program
> Too bad. For nearly everyone, a fast exit() is far more important.

See 1)

Are you game for the SANE 2000 edition of the InSANE quiz?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:56    [W:0.020 / U:15.432 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site