lkml.org 
[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Nasty suprise with uptime
Hmm... ever hear of NTP? My general rule of thumb:
Never trust any CMOS clock; let the kernel keep track
of time and periodically update the CMOS clock so
that you (hopefully) get a reasonable starting point
when you boot. Trusting any clock with a cheap power
source to provide accurate time-keeping is an exercise
in futility... (and it's not necessarily the power
source's fault - even an outrageously expensive power
source doesn't guarantee good time-keeping). I think
of a CMOS clock as kind of a book mark. If the book
mark gets lost, I can still find where I left off,
it just takes a little more work.


tw

On 10/30/2001 15:47 +0100, GOMBAS Gabor wrote:
>> On Tue, Oct 30, 2001 at 07:50:43AM -0600, Tim Walberg wrote:
>>
>> > Wouldn't it be fairly simple for the kernel to just remember the (wall
>> > clock) time at boot, and uptime just subtract that from the current
>> > (wall clock) time?
>>
>> So every people with faulty CMOS batteries would have 30+ years of
>> uptime. And if the CMOS date is ahead of the real one and the admin
>> sets it back, you will get negative uptimes etc. If you want such
>> amusements, it is far easier to write an uptime program that just calls
>> random() instead of asking the kernel :)
>>
>> Gabor
>>
>> --
>> Gabor Gombas Eotvos Lorand University
>> E-mail: gombasg@inf.elte.hu Hungary
End of included message



--
twalberg@mindspring.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.067 / U:7.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site