mailing.openbsd.tech
  Home FAQ Contact Sign in
mailing.openbsd.tech only
 
Advanced search
March 2008
motuwethfrsasuw
     12 9
3456789 10
10111213141516 11
17181920212223 12
24252627282930 13
31       14
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
mailing.openbsd.tech Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Re: [PATCH] ps, S state         


Author: Todd C. Miller
Date: Mar 7, 2008 08:11

In message <47CEF18B.7020304@bsdua.org>
so spake Alexey Vatchenko (av):
> This is my try #3 to post this patch :)
> It makes ps/`ps ax` to show "S" state when idle less that 20sec.

I think it is better to just mark the variables that need a call
to donlist() via a flag and use a single call to donlist().

- todd

Index: bin/ps/keyword.c
===================================================================
RCS file: /home/cvs/openbsd/src/bin/ps/keyword.c,v
retrieving revision 1.27
diff -u -p -u -r1.27 keyword.c
--- bin/ps/keyword.c 13 Apr 2007 19:20:23 -0000 1.27
+++ bin/ps/keyword.c 7 Mar 2008 14:35:05 -0000
@@ -85,8 +85,8 @@ int utime(), stime(), ixrss(), idrss(),

/* Bit types must match their respective entries in struct kinfo_proc2 */
VAR var[] = {
- {"%%cpu", "%%CPU", NULL, 0, pcpu, 4},
- {"%%mem", "%%MEM", NULL, 0, pmem, 4},
+ {"%%cpu", "%%CPU", NULL, NLIST...
Show full article (4.12Kb)
no comments