Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2003 14:49:40 +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:  <200302071349.h17Dnefo076099@lurza.secnetix.de>
In-Reply-To: <200302071245.14865.paul.koch@statscout.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Paul Koch <paul.koch@statscout.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302071349.h17Dnefo076099>