From owner-freebsd-stable Sat Feb 8 6:22:53 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 8BA5137B401 for ; Sat, 8 Feb 2003 06:22:51 -0800 (PST) Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A64D43FB1 for ; Sat, 8 Feb 2003 06:22:50 -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 h18EMcdK028558 for ; Sat, 8 Feb 2003 15:22:38 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.6/8.12.5/Submit) id h18EMcud028557; Sat, 8 Feb 2003 15:22:38 +0100 (CET) Date: Sat, 8 Feb 2003 15:22:38 +0100 (CET) Message-Id: <200302081422.h18EMcud028557@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: <200302081350.33720.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: > My development machine was running CMOS time (might change > that because there is no Windows here!) and there is a > /etc/wall_cmos_clock file. Our network appliance platform only > runs in UTC so my ps runs fine on it. That explains it. > Wouldn't it be more consistant for all process info be stored > in UTC and get ps to convert/display it in localtime ? That's already the case. All times are stored in UTC, and it's only converted to your local timezone for display by ps, ls, date etc. The kernel does not have any timezone information at all -- the kernel knows only UTC. The problem ist that during boot of the kernel, i.e. even before the root filesystem is mounted, there is no way to find out your timezone. If the CMOS clock runs in UTC, then there is no problem -- the kernel just picks it up and uses it as its internal UTC clock. All process time information will be correct, right from the start. However, if the CMOS clock runs in local time, then there is no way for the kernel to convert it to UTC, because the kernel does not know what your local timezone is. How should it know? Those system processes are started before the root filesystem can be mounted, i.e. there is no information from /etc/localtime and /etc/wall_cmos_clock. The kernel has no other choice than interpreting the value of the CMOS clock as UTC, which results in an error that amounts to the offset of your local timezone. 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