From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 18:02:31 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65E7237B401 for ; Wed, 23 Apr 2003 18:02:31 -0700 (PDT) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAAE543FBD for ; Wed, 23 Apr 2003 18:02:30 -0700 (PDT) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id A27855308; Thu, 24 Apr 2003 03:02:26 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: kientzle@acm.org From: Dag-Erling Smorgrav Date: Thu, 24 Apr 2003 03:02:25 +0200 In-Reply-To: <3EA72D85.4030205@acm.org> (Tim Kientzle's message of "Wed, 23 Apr 2003 17:19:17 -0700") Message-ID: User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 References: <200304231644.50685.cbiffle@safety.net> <3EA72D85.4030205@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: Adrian cc: current@freebsd.org Subject: Re: 1Jan 70 -- FreeBSD 5.0-RELEASE + Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 01:02:31 -0000 Tim Kientzle writes: > This has been discussed on this list several > times: those processes are all started > before the kernel has initialized the time. > > Because FreeBSD has to read the disk > before it can know whether the hardware clock > is in UTC or local time, it's hard to really > do much better than this. (I suppose you > could edit 'ps' to display such times > as '-'; that might be less misleading.) You guys have no imagination... Index: kern_proc.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_proc.c,v retrieving revision 1.179 diff -u -r1.179 kern_proc.c --- kern_proc.c 18 Apr 2003 20:17:05 -0000 1.179 +++ kern_proc.c 24 Apr 2003 01:01:37 -0000 @@ -673,6 +673,8 @@ } if ((p->p_sflag & PS_INMEM) && p->p_stats) { kp->ki_start = p->p_stats->p_start; + if (kp->ki_start == 0) + kp->ki_start = boottime; kp->ki_rusage = p->p_stats->p_ru; kp->ki_childtime.tv_sec = p->p_stats->p_cru.ru_utime.tv_sec + p->p_stats->p_cru.ru_stime.tv_sec; Took me all of thirty seconds. DES -- Dag-Erling Smorgrav - des@ofug.org