DragonFly bugs List (threaded) for 2007-03
DragonFly BSD
DragonFly bugs List (threaded) for 2007-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: top: proc summary mismatch


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Fri, 23 Mar 2007 12:51:45 +0100

Dmitry Lohansky wrote:
But is more better mark process as sleeping only if _all_ of this lwps
are in sleeping state.

I'm not sure. Maybe we should display all lwps for the time being. This for sure is an area of discussion.


 int process_states[6];
 char *procstatenames[] = {
-    "", " starting, ", " running, ", " sleeping, ", " stopped, ",
-    " zombie, ",
+    "", " starting, ", " running, ", " stopped, ", " zombie, ",
+    " sleeping, ",
     NULL
 };

well caught!


        {
            total_procs++;
+           if (LP(pp, stat) == LSSLEEP)
+               PP(pp, stat) = SZOMB + 1;
            process_states[(unsigned char) PP(pp, stat)]++;

I don't really like this. Maybe something like


int state;

state = PP(pp, stat);
if (LP(pp, stat) == LSSLEEP)
   state = SZOMB + 1;
process_states[state]++;

what do you think?

cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]