FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 05-15-2008, 09:22 PM
Rashkae
 
Default OT: Computer loosing time

NoOp wrote:

>>
>

>
> Time on the desktops are configured for ntp via pool.ntp.org servers, on
> the laptop with the dead CMOS it has not been configured and is at it's
> default (manual). However, I seem to recall that at boot, the laptop
> does go out to get it's initial time from the Canonical ntp server even
> if ntp is not installed.
>
>

I think you misunderstand my concern (which, really, has nothing to do
with Ubuntu, sorry for abusing the list such)

My CMOS clock and battery are both perfectly fine. It's the system time
when the computer is on and running that slips.

It is my understanding that the OS keeps track of time itself through
whatever computers use as a timing method now. I really couldn't care
less if the time is correct to the second. My concern is, if the system
can't even keep track of seconds in an hour, how many other processes
that rely on timing mechanisms are going to get messed up?

Unfortunately, (and you won't see me admit this often) I don't know
enough about PC hardware to tell you what exactly is responsible for the
time.. some kind of chip that generates interrupts at a given rate? Is
this something specific to the Motherboard or CPU?

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-15-2008, 11:40 PM
NoOp
 
Default OT: Computer loosing time

On 05/15/2008 02:22 PM, Rashkae wrote:
> NoOp wrote:
>
>>>
>>
>
>>
>> Time on the desktops are configured for ntp via pool.ntp.org servers, on
>> the laptop with the dead CMOS it has not been configured and is at it's
>> default (manual). However, I seem to recall that at boot, the laptop
>> does go out to get it's initial time from the Canonical ntp server even
>> if ntp is not installed.
>>
>>
>
> I think you misunderstand my concern (which, really, has nothing to do
> with Ubuntu, sorry for abusing the list such)

alt.comp.hardware is your best bet.

I think you misunderstand my post - that is; I was responding to
comments regarding the CMOS battery. And pointing out that, even with a
dead CMOS battery _Ubuntu_ will run fine.

>
> My CMOS clock and battery are both perfectly fine. It's the system time
> when the computer is on and running that slips.

Really? Have you tried checking the time at shutdown, turning off the
system for a few hours, booting back up, checking system time in bios on
boot to see if the CMOS clock is keeping or losing time? Simply because
you have a clock doesn't mean that the CMOS battery is good. A dying
CMOS battery will cause the system to lose time if it is not supplying
sufficient voltage to the clocking circuits. It is also possible that a
motherboard clocking chip has been set by bios incorrectly, or the
chip/circuit is going bad. Even a bad capacitance device, or bad crystal
can cause the clock frequencies to shift or drift.

>
> It is my understanding that the OS keeps track of time itself through
> whatever computers use as a timing method now. I really couldn't care
> less if the time is correct to the second. My concern is, if the system
> can't even keep track of seconds in an hour, how many other processes
> that rely on timing mechanisms are going to get messed up?

If your OS is relying on _the system clock_, and the clock is losing
time, then it will use and report the time according to the system
clock. If you have Ubuntu set for something other than UTC, it will
periodically go out and get the time from the system clock. You'll see
this option on install; whether to use the system clock or use UTC. Post
the output of:

cat /etc/default/rcS

If it shows:

UTC=no

then it is set to use the system clock.

>
> Unfortunately, (and you won't see me admit this often) I don't know
> enough about PC hardware to tell you what exactly is responsible for the
> time.. some kind of chip that generates interrupts at a given rate? Is
> this something specific to the Motherboard or CPU?
>

Yes.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 01:47 AM
Mike Bird
 
Default OT: Computer loosing time

On Thu May 15 2008 16:40:41 NoOp wrote:
> If your OS is relying on _the system clock_, and the clock is losing
> time, then it will use and report the time according to the system
> clock. If you have Ubuntu set for something other than UTC, it will
> periodically go out and get the time from the system clock. You'll see
> this option on install; whether to use the system clock or use UTC. Post
> the output of:

Linux takes the time from the system clock at boot, and writes
it back at shutdown. While Linux is running the clock is maintained
by interrupts from a motherboard timer.

It is not uncommon for motherboard clocks to drift a minute per day.
I've seen them drift thirty minutes or more but that is rare. If
you need accurate timing and if you're always online use ntp.

Sometimes motherboard clocks only drift under heavy load. This can
be caused by interrupt problems, for example heavy disk activity
without "unmask-interrupts" (hdparm -u1 ...).

--Mike Bird

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 04:28 AM
Mario Vukelic
 
Default OT: Computer loosing time

On Thu, 2008-05-15 at 18:47 -0700, Mike Bird wrote:
> If
> you need accurate timing and if you're always online use ntp.

By the way, if you need accurate timing and are not always online, use
chrony.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 03:55 PM
NoOp
 
Default OT: Computer loosing time

On 05/15/2008 06:47 PM, Mike Bird wrote:
> On Thu May 15 2008 16:40:41 NoOp wrote:
>> If your OS is relying on _the system clock_, and the clock is losing
>> time, then it will use and report the time according to the system
>> clock. If you have Ubuntu set for something other than UTC, it will
>> periodically go out and get the time from the system clock. You'll see
>> this option on install; whether to use the system clock or use UTC. Post
>> the output of:
>
> Linux takes the time from the system clock at boot, and writes
> it back at shutdown. While Linux is running the clock is maintained
> by interrupts from a motherboard timer.

In the case where the system is set to use UTC, with a working network
connection at boot, Ubuntu goes out and gets the time from Canonical by
default. For example, on the laptop that has the dead CMOS battery I
booted without changing the clock. If I do 'sudo hwclock -r' it shows:

Thu 31 Dec 1987 04:13:28 PM PST -0.611754 seconds

However, my calendar, my logs, etc., all show the correct time: Friday
May 16 08:13:28 AM etc. From that point onward Ubuntu may rely on
interupts etc., for the time if I've not set the system to use ntp I
suppose, I've not looked at it further.

Now the interesting part; if I reboot again without a network
connection, I see that the bios clock has been set to the proper date,
and Ubuntu comes back up the correct May 16th time. Which proves your
point that linux writes the time back at shut down. I learned something
new - thanks!

Note: if I bring up Ubuntu on the dead CMOS (ala 31 Dec 1987) without a
network connection, Ubuntu comes up with the bios time setting (31 Dec
1987), as expected. However, before it completes the desktop, it does
then provide a popup telling me:

====
The computer clock appears to be wrong
The session might encounter issues if the computer clock
is not properly configured. Please consider adjusting it.
Current date is 12/31/1987
Ignore Adjust the Clock
====

But then of course, I have the "Could not authenticate" bug (Hardy) on
that machine, so I can't adjust it from the popup & can't get past the
goony bird spash screen...
https://bugs.launchpad.net/ubuntu/+source/gnome-system-tools/+bug/194496

None of this probably helps Rashkae, but for me it was an interesting
experiment :-)


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 04:38 PM
Rashkae
 
Default OT: Computer loosing time

This is all kinds of incorrect. I may not know all the nitty hardware
details, but here's what I know of how Linux works.

NoOp wrote:

> In the case where the system is set to use UTC, with a working network
> connection at boot, Ubuntu goes out and gets the time from Canonical by
> default. For example, on the laptop that has the dead CMOS battery I
> booted without changing the clock. If I do 'sudo hwclock -r' it shows:
>

This has nothing to do with whether the cmos clock is in UTC or not. If
NTP service is installed (It's not by default in any of the Ubuntu
systems I've installed so far, but that may be an option in the
installer dialogues I skip), Then the time will by synced with the
ubuntu server on boot, as you say.

The system time gets written to the CMOS on shutdown, and only on
shutdown (unless manually done with the hwclock -w command). hwclock
keeps track of whether you want CMOS clock to be written in UTC or local
time, and makes any adjustments needed.

Presumably, with NTP service enabled, the time will resync with the
Internet servers on a periodic basis. I don't know what the default
interval is, however.. my own observation is that it cannot be more than
once a day. (Is it a cron job?) In any case, assuming all hardware is
working correctly, there should be no need to resync time on a running
modern system.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 05:12 PM
NoOp
 
Default OT: Computer loosing time

On 05/16/2008 09:38 AM, Rashkae wrote:
> This is all kinds of incorrect. I may not know all the nitty hardware
> details, but here's what I know of how Linux works.
>
> NoOp wrote:
>
>> In the case where the system is set to use UTC, with a working network
>> connection at boot, Ubuntu goes out and gets the time from Canonical by
>> default. For example, on the laptop that has the dead CMOS battery I
>> booted without changing the clock. If I do 'sudo hwclock -r' it shows:
>>
>
> This has nothing to do with whether the cmos clock is in UTC or not. If
> NTP service is installed (It's not by default in any of the Ubuntu
> systems I've installed so far, but that may be an option in the
> installer dialogues I skip), Then the time will by synced with the
> ubuntu server on boot, as you say.

I think you are forgetting about ntpdate.
http://packages.ubuntu.com/hardy/ntpdate - you'll find it in Gutsy et al

I do not have ntp installed on that machine, I do not have the time
settings to use ntp, in fact the only settings that were done were those
done during install setting to my local time zone and setting to UTC.
It's a fresh, fully updated Hardy install.

Ubuntu comes with ntpdate & it is run once at boot. Here you go, from my
router logs on that machine:

192.168.3.108:123 to ntp.ubuntu.com(91.189.94.4):123

Have a look in /etc/default/ntpdate and you will find the default
NTPSERVERS="ntp.ubuntu.com"


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 05:20 PM
Nils Kassube
 
Default OT: Computer loosing time

Rashkae wrote:
> Presumably, with NTP service enabled, the time will resync with the
> Internet servers on a periodic basis. I don't know what the default
> interval is, however.. my own observation is that it cannot be more
> than once a day. (Is it a cron job?) In any case, assuming all
> hardware is working correctly, there should be no need to resync time
> on a running modern system.

With ntpdate installed (don't know if it is default) the machine is
synchronized with the Ubuntu server at startup. I don't think there is a
new synchronization later again. A clock synchronization could break
applications if the machine time jumps too much. From many years ago I
remember a problem with cron after a time adjustment.

If you have ntp installed, your machine will be continuosly synchronized
to the time server. The sync interval depends on the clock variation of
your machine. IIRC the interval is in the range 60s to 1000s. Of course
that can only work with a permanent internet connection.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-16-2008, 05:43 PM
"Eric S. Johansson"
 
Default OT: Computer loosing time

Nils Kassube wrote:

> If you have ntp installed, your machine will be continuosly synchronized
> to the time server. The sync interval depends on the clock variation of
> your machine. IIRC the interval is in the range 60s to 1000s. Of course
> that can only work with a permanent internet connection.

NTP does not require a permanent connection to work. It will function albeit
not quite as well, if you have an intermittent connection. usually the default
case for a time reference is the local clock which is the clock you are
adjusting. Seems kind of silly but, it's a clever way of handling the case of
no time server available by the network case.
---eric


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 04:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org