Re: [gentoo-user] OT: ntp
begin quote On Thu, 3 Jul 2003 21:34:12 +0200 (CEST) Joel Palmius [EMAIL PROTECTED] wrote: As a note of interest here: I don't think this is gentoo-specific problem. I had exactly the same problem with two different versions of Mandrake too. Amusingly enough I never had the problem with older versions of Mandrake, so something must've changed during the last 18 months or so. [ CUTS BIG BLOTCHES OF REPLIED TEXT] Well, don't take me to hard on this since I don't have quotes or links to back it up, and frankly I'm too lazy to pop up google right now and find the quotes for you ;) , but, I recall the timekeeping problem boiling down to changes with preemptive and lockbreaking systems, along with some changes to how the kernels internal tick's go. as said, running hwclock --hw2sys in a cronjob would work, but only at the price of brutalizing your logs, causing make to fail (it checks timestamps, and you just changed time on a running kernel) and generally cocking things up. Better to use ntp mainly because of its small sync changes. //Spider -- begin .signature This is a .signature virus! Please copy me into your .signature! See Microsoft KB Article Q265230 for more information. end pgp0.pgp Description: PGP signature
Re: [gentoo-user] OT: ntp
On Fri, 4 Jul 2003, Robert Bragg wrote: My point was (I still think this is correct) that if his setup is resulting in his clock getting out of sync on a daily basis, by 20-30 minutes then he has bigger problems to think about before he starts playing with ntpd. True, true.. I stopped using NTPd because of this (it gave up like one time in a week becuase the lag was too large). I'm back to syncing time with home-made perl scripts instead. Although, what to do when it seems it is the system *software* that seems to mess up time and there seems to be no explanation as to why? These are the explanations I've heard so far for the lagging time behavior: * It's the power-save functionality of the kernel messing time up (No it isn't, problem remains unchanged no matter if APM and APIC is enabled or disabled) * It's a hardware error (no it isn't, since hwclock shows the correct time) * It's a bug in the gnome clock applet (no it isn't, since I run KDE, and besides the problem is the same in console mode) * It's a problem with settings of IDE disks and too aggressive hdparm settings, with the result that the system doesn't have the resources left to call the clock interrupt often enough (nope, I have a system entirely built on SCSI. This one might still be true some similar way though, but I don't know how to check it) * You haven't enabled RTC or RTC isn't readable (It is, I checked. Besides VMWare complains loudly if RTC isn't available, and since VMWare keeps quiet I think I did right) If someone else have any theories - no matter how far out, I will even check for evil green goblins sitting in the chassis messing with the clock chip - I will sure test them. // Joel -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
There is more than one cause. Check the forums, its full of this issue. The definite cause for me on a celery dell laptop was the gnome battery applet. It has a known bug (fixed???) where it stalls the machine whilst reading /proc under apm. On a later machine with a much faster p4, you can sometimes see it wandering a little, but never as much as previously. ide accesses (esp burning cd's) was another cause. Check the unmask irq and dma. Chrony seems a little more tolerant and trouble free than ntp under these conditions, but I think ntp does a better job on a normal system. BillK On Fri, 2003-07-04 at 17:42, Joel Palmius wrote: On Fri, 4 Jul 2003, Robert Bragg wrote: My point was (I still think this is correct) that if his setup is resulting in his clock getting out of sync on a daily basis, by 20-30 minutes then he has bigger problems to think about before he starts playing with ntpd. True, true.. I stopped using NTPd because of this (it gave up like one time in a week becuase the lag was too large). I'm back to syncing time with home-made perl scripts instead. Although, what to do when it seems it is the system *software* that seems to mess up time and there seems to be no explanation as to why? These are the explanations I've heard so far for the lagging time behavior: * It's the power-save functionality of the kernel messing time up (No it isn't, problem remains unchanged no matter if APM and APIC is enabled or disabled) * It's a hardware error (no it isn't, since hwclock shows the correct time) * It's a bug in the gnome clock applet (no it isn't, since I run KDE, and besides the problem is the same in console mode) * It's a problem with settings of IDE disks and too aggressive hdparm settings, with the result that the system doesn't have the resources left to call the clock interrupt often enough (nope, I have a system entirely built on SCSI. This one might still be true some similar way though, but I don't know how to check it) * You haven't enabled RTC or RTC isn't readable (It is, I checked. Besides VMWare complains loudly if RTC isn't available, and since VMWare keeps quiet I think I did right) If someone else have any theories - no matter how far out, I will even check for evil green goblins sitting in the chassis messing with the clock chip - I will sure test them. // Joel -- [EMAIL PROTECTED] mailing list -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
William Kenworthy [EMAIL PROTECTED] wrote: There is more than one cause. Check the forums, its full of this issue. The definite cause for me on a celery dell laptop was the gnome battery applet. It has a known bug (fixed???) where it stalls the machine whilst reading /proc under apm. On a later machine with a much faster p4, you can sometimes see it wandering a little, but never as much as previously. ide accesses (esp burning cd's) was another cause. Check the unmask irq and dma. Another problem could be using framebuffer display on the console. Cheers, Juri -- Juri Haberland [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
On Fri, Jul 04, 2003 at 11:42:59AM +0200, Joel Palmius wrote: Although, what to do when it seems it is the system *software* that seems to mess up time and there seems to be no explanation as to why? These are the explanations I've heard so far for the lagging time behavior: [...] * It's a hardware error (no it isn't, since hwclock shows the correct time) [...] * It's a problem with settings of IDE disks and too aggressive hdparm settings, with the result that the system doesn't have the resources left to call the clock interrupt often enough (nope, I have a system entirely built on SCSI. This one might still be true some similar way though, but I don't know how to check it) Heck, I had both a clock that slipped off significantly, and sound that would occasionally 'glitch' and stutter. Turned out both had the same cause: I have an ASUS A7V8X motherboard, and the ASUS 'iPanel' front panel display. There's a setting in the BIOS that is supposed to cause the display to cycle between its various values (it can display fan speeds, temperatures, boot status, and the like) at regular intervals. Turns out that the BIOS setting turned on some interrupt that Linux didn't know how to handle properly, and that resulted in blocking the timer interrupt a couple of times every several seconds. Now, while I have no idea what motherboard and settings you're using, the lesson here is, un-handled interrupts are a common cause of this (as you mention above), and that Linux may not be the only source of interrupts on your system. Check for any BIOS setting that enables repetitive operations as well, as that may be happening at the hardware level. ---+--- Bryan Feir VA3GBF|A half-truth, like a half-brick, is more forcible Home:[EMAIL PROTECTED] | in an argument than a whole one... | it carries further. -- Stephen Leacock ---+--- -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
I have this problem too, but noticed that there's a difference between system time (as measured by date) and hardware time (as measured by hwclock). Since the hardware clock seemed to keep up, while the system time sometimes lagged as much as 25% compared to real time, my solution was to make a cronjob which syncs system time with hardware time once an hour, thus making NTPd unneccessary. I have attached the perlscript doing the syncing in case anyone's interested. (There is probably a better and standard way of doing this though, I find it surprising that the kernel or something doesn't do this automatically) // Joel On Thu, 3 Jul 2003, Christopher Egner wrote: Alright, perhaps I'm a bit lost on this. My clock always runs off about 20 to 30 minutes after a day or so. Only in linux though. I figured I'd start using ntpd. However, I can't seem to figure out how to configure a timezone for it. Any help here would be great. -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list #!/usr/bin/perl $date = `date`; $hw = `hwclock`; chop($date); chop($hw); print $date; @darr = split(/\ +/,$date); @harr = split(/\ +/,$hw); $dnow = $darr[0] . . $darr[1] . . $darr[2] . . $darr[3]; $hnow = $harr[0] . . $harr[1] . . $harr[2] . . $harr[3]; system date --set=\$hnow\; -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
I think ntp is the wrong tool for the job here. ntp isn't for keeping you clock about right, its for when you want yor clock to be extremly acurate. You should have a working clock to startwith (i.e. no harware errors or miss-configurations) Unless you force it to (-g I think), ntpd will usually kill itsself if it detects an error with your clock (i.e. if it goes to far out of sync it will give up.) Just saying, 'coz ntpd seems to be a slightly missused tool. Rob On Thu, Jul 03, 2003 at 12:13:39AM -0500, Christopher Egner wrote: Alright, perhaps I'm a bit lost on this. My clock always runs off about 20 to 30 minutes after a day or so. Only in linux though. I figured I'd start using ntpd. However, I can't seem to figure out how to configure a timezone for it. Any help here would be great. -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
Alright then, any ideas what to use. I mean, I agree syncing to multiple servers seems a bit drastic (nice to know I won't be late for work, but still...). Shoot even syncing to one! I saw the perl script, and I'll give that a go, but there's gotta be a better way. I mean for the system to be off twenty minutes after running a day is inexcusable for most systems. If anyone has any other ideas. let me know On Thu, 2003-07-03 at 09:09, Robert Bragg wrote: I think ntp is the wrong tool for the job here. ntp isn't for keeping you clock about right, its for when you want yor clock to be extremly acurate. You should have a working clock to startwith (i.e. no harware errors or miss-configurations) Unless you force it to (-g I think), ntpd will usually kill itsself if it detects an error with your clock (i.e. if it goes to far out of sync it will give up.) Just saying, 'coz ntpd seems to be a slightly missused tool. Rob On Thu, Jul 03, 2003 at 12:13:39AM -0500, Christopher Egner wrote: Alright, perhaps I'm a bit lost on this. My clock always runs off about 20 to 30 minutes after a day or so. Only in linux though. I figured I'd start using ntpd. However, I can't seem to figure out how to configure a timezone for it. Any help here would be great. -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list -- [EMAIL PROTECTED] mailing list -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
As a note of interest here: I don't think this is gentoo-specific problem. I had exactly the same problem with two different versions of Mandrake too. Amusingly enough I never had the problem with older versions of Mandrake, so something must've changed during the last 18 months or so. (this is on several different machines too, so I don't think hardware problem likely) // Joel On Thu, 3 Jul 2003, Christopher Egner wrote: Alright then, any ideas what to use. I mean, I agree syncing to multiple servers seems a bit drastic (nice to know I won't be late for work, but still...). Shoot even syncing to one! I saw the perl script, and I'll give that a go, but there's gotta be a better way. I mean for the system to be off twenty minutes after running a day is inexcusable for most systems. If anyone has any other ideas. let me know On Thu, 2003-07-03 at 09:09, Robert Bragg wrote: I think ntp is the wrong tool for the job here. ntp isn't for keeping you clock about right, its for when you want yor clock to be extremly acurate. You should have a working clock to startwith (i.e. no harware errors or miss-configurations) Unless you force it to (-g I think), ntpd will usually kill itsself if it detects an error with your clock (i.e. if it goes to far out of sync it will give up.) Just saying, 'coz ntpd seems to be a slightly missused tool. Rob On Thu, Jul 03, 2003 at 12:13:39AM -0500, Christopher Egner wrote: Alright, perhaps I'm a bit lost on this. My clock always runs off about 20 to 30 minutes after a day or so. Only in linux though. I figured I'd start using ntpd. However, I can't seem to figure out how to configure a timezone for it. Any help here would be great. -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list -- [EMAIL PROTECTED] mailing list -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
On 3/7/03 6:28 pm, Christopher Egner [EMAIL PROTECTED] wrote: Alright then, any ideas what to use. I mean, I agree syncing to multiple servers seems a bit drastic (nice to know I won't be late for work, but still...). ... If anyone has any other ideas. let me know rdate was mentioned on a posting a couple of months ago. HTH, Stroller. -- Enjoyed this post? Thanks for reading - please consider employing me! Technical support / system administration - CV available on request Linux / Unix / Windows / Mac OS X - UK or anywhere considered -- Forwarded Message From: Matthew Daubenspeck [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 10 Apr 2003 12:13:35 -0400 To: gentoo [EMAIL PROTECTED] Subject: Re: [gentoo-user] Time On Thu, Apr 10, 2003 at 05:59:30AM -0500, ds wrote: In winblowz, I can use atomic clock to keep my server time accurate, is there a like service for Linux? rdate works very well... * net-misc/rdate Latest version available: 990821 Latest version installed: 990821 Size of downloaded files: 3 kB Homepage:http://www.freshmeat.net/projects/rdate Description: rdate uses the NTP server of your choice to syncronize/show the current time -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
On Thu, 2003-07-03 at 17:23, Stroller wrote: On 3/7/03 6:28 pm, Christopher Egner [EMAIL PROTECTED] wrote: Alright then, any ideas what to use. I mean, I agree syncing to multiple servers seems a bit drastic (nice to know I won't be late for work, but still...). ... If anyone has any other ideas. let me know rdate was mentioned on a posting a couple of months ago. HTH, Stroller. I don't understand the objection to ntpd. I run it at home and at work. It works great and uses very few resources. The idea for using at least three servers is reliability. Ntpd keeps track of the servers and uses what it considers the best server to sync to, if that one goes down it will switch to one of the others. Use it and you will never have to worry about drifting time. -- Tim Ryan [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
Stroller [EMAIL PROTECTED] wrote: On 3/7/03 6:28 pm, Christopher Egner [EMAIL PROTECTED] wrote: Alright then, any ideas what to use. I mean, I agree syncing to multiple servers seems a bit drastic (nice to know I won't be late for work, but still...). ... It's not drastic. It's just to be on he safe side. Imageine you sync to just one server and theat one fils or even worse, suddenly has a wrong time. You're screwed then. When using multiple servers ntp can detect servers with a wrong time and will ignore it. If they all have the right time it will choose the accuratest one. If anyone has any other ideas. let me know rdate was mentioned on a posting a couple of months ago. rdate or ntpdate should only be run once at boot time. *Never* run it periodically from cron or your system time my jump and this will confuse some daemons and applications. Cheers, Juri -- Juri Haberland [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
Juri Haberland [EMAIL PROTECTED] wrote: Whoops, lots of spelling mistakes. Sorry for that. Cheers, Juri -- Juri Haberland [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
On Thu, Jul 03, 2003 at 10:20:32PM +, Juri Haberland wrote: Robert Bragg [EMAIL PROTECTED] wrote: I think ntp is the wrong tool for the job here. ntp isn't for keeping you clock about right, its for when you want yor clock to be extremly acurate. Just saying, 'coz ntpd seems to be a slightly missused tool. Nope, ntp is *exactly* for keeping your system clock in sync with UTC. So use ntp. It's there exactly for what the original poster wanted. My point was (I still think this is correct) that if his setup is resulting in his clock getting out of sync on a daily basis, by 20-30 minutes then he has bigger problems to think about before he starts playing with ntpd. Sure ntpd is an excelent way for keeping clocks in sync. Perhaps I over emphasised with the words extremly acurate (sorry) I was just making the destinction between jumping a clock by 20minutes, every hour and somthing that would rather skew you clock speed to catch back a lost _millisecond_. ntpd wont skew the clock for 20min, it will usually exit becuase it suspects you have a serious problem! You can overide that behaviour, but I can't see many reasons for doing that Most computers are capable of keeping _fairly good_ time on their own, any time when ntpd isn't running (e.g. if you turn your computer off) your clock shouldn't stray by much (milliseconds/seconds I guess depending how long your machine is off) By all means use ntp, but atleast make sure you clock is physically sound, you have set your timezone correctly and there should be no other reason for the clock to jump around unexpectedly else you will just confuse ntpd. Thanks, Rob -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] OT: ntp
Nevermind. Stupid me didn't set the timezone in KDE to view! Well now I'm gonna go kick myself. Night -- Christopher In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon. Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 95. Something must have gone wrong. -- [EMAIL PROTECTED] mailing list