In article <[email protected]>,
[email protected] (Denys Vlasenko) wrote:

> *From:* Denys Vlasenko <[email protected]>
> *To:* [email protected], [email protected]
> *Date:* Wed, 2 Feb 2011 00:59:22 +0100
> 
> On Tuesday 01 February 2011 18:10, David Collier wrote:
> > What's the story with fields on a ps command output?
> > 
> > I have a copy of 1.10 here which has the -o option allowing the 
> > user to
> > choose the columns
> > But I've got a copy of 1.13 which doesn't allow this, so I assume 
> > this is
> > a busybox build choice?
> 
> You need to exable DESKTOP=y in .config

ah, so on a random box it may or may not be there. TVM

trouble is, across the years, the "default output columns" have rather
varied !
so    ps|cut -f4 
doesn't produce a very predictable result!

> > In the 1.13 one there is the option of a "stat" field 
> 
> Can you send the .config with which you have working "ps -o stat"?
> 
> # ./busybox ps -o stat
> ps: bad -o argument 'stat'
> # ./busybox | head -1
> BusyBox v1.13.0 (2008-11-10 22:24:12 CET) multi-call binary

I obviously lied about it being in 1.13 :-(  it was in a much earlier
version. So stat was there once :-)

# ps --help
BusyBox v0.60.5 (2005.06.03-15:39+0000) multi-call binary

No help available.

# ps
  PID TTY     Uid        Size State Command
    1         root       1548   S   init            
    2         root          0   S   [keventd]

I don't have any info on that system beyond what I find on it.
    
> > More to the point, if I don't have stat, can I be sure I won't 
> > see zombie and terminated processes in the output of ps?
> 
> Looks like -o stat is not implemented.

OK - but I still wonder if the zombie and terminated processes are going
to be in the output of standard ps "looking like real processes"...

I could always read the source I guess :-)
 
If I have asked a process to die, and am trying to confirm I was obeyed,
I don't want to go panicking that it's still in the ps output when it's
in fact a zombie, and on it's way out, slowly.

Can I go off and get the equivalent "I'm a zombie/terminated" info in
/proc? I poked about yesterday but didn't spot it in an easily readable
format...

TVM

D
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to