'ps' behavoir in Linux - Was - Re: array limits

Jay R. Ashworth jra at baylink.com
Fri Apr 16 11:55:08 PDT 2004


On Fri, Apr 16, 2004 at 02:38:36PM -0400, Fairlight wrote:
> Confusious (Jay Ashworth) say:

I'm glad we're clear on that.

> > IIRC, the brackets mean that the process is swapped out, and ps can't
> > therefore *get to* it's PCB to find out what arguments were given to
> > it.
> 
> I can't attest to the old 'ps', but proc-ps has no such excuse, as /proc
> maintains those states no matter what state the process is in.  It
> might be a form of denoting such a state, but you can still look at the
> /proc/$PID/environ file, and the environment is readily discernable.  You
> can cat it, although the more sophisticated might want to run it through a
> split against NULL.  That's how the values are separated.

I was talking about the SCO ps, which I believe was what he was talking
about; procps appears to use the brackets for "not a real process; part
of the kernel".

But I could believe that /proc/$PID could be temporarily unpopulated
for processes which were swapped out; I'm not authoritatively familiar
with the semantics there.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Member of the Technical Staff     Baylink                             RFC 2100
The Suncoast Freenet         The Things I Think
Tampa Bay, Florida        http://baylink.pitas.com             +1 727 647 1274

        "They had engineers in my day, too."  -- Perry Vance Nelson


More information about the Filepro-list mailing list