Subject: Re: ps issues with recent NetBSD 4.0_beta2
To: Aleksey Cheusov <cheusov@tut.by>
From: Dave Tyson <Dave.Tyson@liverpool.ac.uk>
List: netbsd-users
Date: 07/11/2007 22:04:22
On Wednesday 11 July 2007 20:19:46 Aleksey Cheusov wrote:
> > 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 ~>
Thanks for the feedback, I thought I had seriously screwed up a build. I see
the correct output for the looping process above, but most other processes
except compute bound ones like dnetc report 0:00.00. Yet a copy of ps from
last year seems to report times which tally with top. I have put the latter
binary on an ftp server (ftp://ftp.liv.ac.uk/pub/dtyson/ps), it would be
useful if you could see if it reports more sensible times on your system.
I'll have a look at differences between the versions and see if I can spot
where the error lies and put in a PR.
Cheers,
Dave
--
=====================================================================
Phone: 07772420022
WWW: http://www.liv.ac.uk/~dtyson
Open Source O/S: www.netbsd.org
Caving: http://www.wirralcavinggroup.uk.eu.org
=====================================================================