Subject: Re: ps issues with recent NetBSD 4.0_beta2
To: Dave Tyson <Dave.Tyson@liverpool.ac.uk>
From: Aleksey Cheusov <cheusov@tut.by>
List: netbsd-users
Date: 07/11/2007 22:19:46
> Just noticed something peculiar with a recently compiled (after 25th June) 
> kernel/userland for NetBSD 4.0_beta2. ps seems to report some process
> elapsed times to generally be zero which doesn't tally with top etc. say.
> e.g

> root(anduin)tmp$ ps -ax |head -20
>   PID TTY    STAT    TIME COMMAND
>     0 ?      DKs  0:00.00 [swapper]
>     1 ?      Is   0:00.00 init
>     2 ?      DK   0:00.00 [atabus0]
>     3 ?      DK   0:00.00 [atabus1]
>     4 ?      DK   0:00.00 [usb0]
>     5 ?      DK   0:00.00 [usbtask-hc]
>     6 ?      DK   0:00.00 [usbtask-dr]
>     7 ?      DK   0:00.00 [cryptoret]
>     8 ?      DK   0:00.00 [pagedaemon]
>     9 ?      DK   0:00.00 [ioflush]
>    10 ?      DK   0:00.00 [aiodoned]
>    44 ?      DK   0:00.00 [physiod]
>    97 ?      I    0:00.00 /usr/pkg/sbin/httpd -k start
>    98 ?      I    0:00.00 /usr/pkg/sbin/httpd -k start
>    99 ?      I    0:00.00 /usr/pkg/sbin/httpd -k start
>   253 ?      Is   0:00.00 /sbin/dhclient
>   285 ?      I    0:00.00 /usr/pkg/sbin/httpd -k start
>   315 ?      Ss   0:00.00 /usr/sbin/syslogd -s
>   474 ?      Ss   0:00.00 /usr/sbin/ntpd
[skipped]

> Anyone else seeing this?
I see the same. Most processes (77 from 82) have 0:00.00 at TIME column.

But

0 ~>yes > /dev/null & 
[1] 7659
[1]  0 ~>sleep 10
[1]  0 ~>ps -ax | grep yes
7233 ttyp1 R+   0:00.00 grep yes (ksh)
7659 ttyp1 R    0:16.74 yes 
[1]  0 ~>

-- 
Best regards, Aleksey Cheusov.