From owner-freebsd-stable Fri Feb 7 5:49:59 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 320FD37B406 for ; Fri, 7 Feb 2003 05:49:56 -0800 (PST) Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8801E43F3F for ; Fri, 7 Feb 2003 05:49:54 -0800 (PST) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [IPv6:::1]) by lurza.secnetix.de (8.12.6/8.12.5) with ESMTP id h17DnedK076100 for ; Fri, 7 Feb 2003 14:49:42 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.6/8.12.5/Submit) id h17Dnefo076099; Fri, 7 Feb 2003 14:49:40 +0100 (CET) Date: Fri, 7 Feb 2003 14:49:40 +0100 (CET) Message-Id: <200302071349.h17Dnefo076099@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG Reply-To: freebsd-stable@FreeBSD.ORG Subject: Re: Invalid ps start time values for kernel processes ? In-Reply-To: <200302071245.14865.paul.koch@statscout.com> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.7-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Paul Koch wrote: > The ps output value for STARTED appears to be incorrect for > kernel started processes. I found this while writing a tiny ps > for our freebsd based network appliance. The start time returned > from /proc/{normal pid}/status (man procfs) appears to be in > UTC while the start time for a kernel process appears to be > localtime (or the other way round). This gave me wild values. > Is this correct behaviour ? Is your CMOS clock running with local time, rather than UTC? (i.e. does the file /etc/wall_cmos_clock exist?) In that case, the kernel will start up with the wrong time information, because it doesn't know the timezone you're in (the kernel always uses UTC internally). This information is corrected by the adjkerntz program in the early stages of the boot process. However, the kernel processes start before that correction happens. If you were living east of Greenwich (i.e. positive timezone offset), the start time values would even be in the future. If FreeBSD is the only operating system on that machine, I suggest that you run the CMOS clock with UTC, avoiding the problem alltogether. Of course, you can also just ignore the wrong start values. They should not cause any harm. I don't think there is an easy way to fix the problem. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message