Date: Sat, 8 Feb 2003 15:22:38 +0100 (CET) From: Oliver Fromme <olli@secnetix.de> To: freebsd-stable@FreeBSD.ORG Subject: Re: Invalid ps start time values for kernel processes ? Message-ID: <200302081422.h18EMcud028557@lurza.secnetix.de> In-Reply-To: <200302081350.33720.paul.koch@statscout.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Paul Koch <paul.koch@statscout.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302081422.h18EMcud028557>