Subject: Re: bin/36295: ps displays 0:00.00 for CPU time of all processes
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-bugs
Date: 07/28/2007 16:20:02
The following reply was made to PR bin/36295; it has been noted by GNATS.

From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/36295: ps displays 0:00.00 for CPU time of all processes
Date: Sat, 28 Jul 2007 18:18:24 +0200

 There are several issues:
 
 processes and LWPs share common state values like SIDL (for proc)
 and LSIDL (for lwp) that used to be identical. ps thus interprets
 them the same.
 
 The value LSSLEEP (==3) however is now seen as SDYING (==3). A
 process in state SDYING is handled like a zombie process and
 has no valid cputime accumulated. Thus ps shows zero.
 
 
 One solution would be to renumber the SDYING state to something
 new (like 10).
 
 The other solution would be to teach the kvm interface (syscall
 and userland for core-file groveling) that the state values
 for proc and lwp do not have identical values for equivalent
 states.
 
 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."