|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Time drift
I run a cron job on all my machines at varying times between midnight and 1 am that updates the system clock via NTP. I've noticed that the drift on my machines is usually between 2-4 seconds, which I guess isn't too bad, but when you stop to think about it, if I wasn't updating via NTP every day, then after a month I would be nearly a minute off.
Not to mention running at securelevel 2+ caps time changes at 1 second. So, is there some sysctl that can be set to tune the clock ticks? I did a quick google search that didn't yield much too promising (then again I'm on the brink of passing out from lack of sleep). Any help would greatly be appreciated, as I would like to bump up the securelevel to 3 once my firewall rules are in place and thoroughly tested. sysctl kern.timecounter: Code:
kern.timecounter.tick: 1 kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) kern.timecounter.hardware: ACPI-fast kern.timecounter.nsetclock: 4 kern.timecounter.ngetmicrotime: 4239525 kern.timecounter.ngetnanotime: 1 kern.timecounter.ngetbintime: 0 kern.timecounter.ngetmicrouptime: 1846524 kern.timecounter.ngetnanouptime: 1902 kern.timecounter.ngetbinuptime: 18796 kern.timecounter.nmicrotime: 756286 kern.timecounter.nnanotime: 115 kern.timecounter.nbintime: 756427 kern.timecounter.nmicrouptime: 66335 kern.timecounter.nnanouptime: 3 kern.timecounter.nbinuptime: 950632 kern.timecounter.stepwarnings: 0 kern.timecounter.tc.i8254.mask: 65535 kern.timecounter.tc.i8254.counter: 35499 kern.timecounter.tc.i8254.frequency: 1193182 kern.timecounter.tc.i8254.quality: 0 kern.timecounter.tc.ACPI-fast.mask: 16777215 kern.timecounter.tc.ACPI-fast.counter: 3199901 kern.timecounter.tc.ACPI-fast.frequency: 3579545 kern.timecounter.tc.ACPI-fast.quality: 1000 kern.timecounter.tc.TSC.mask: 4294967295 kern.timecounter.tc.TSC.counter: 1817965752 kern.timecounter.tc.TSC.frequency: 1041000000 kern.timecounter.tc.TSC.quality: -100 kern.timecounter.smp_tsc: 0 Code:
Timecounter "i8254" frequency 1193182 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 Timecounters tick every 1.000 msec I guess an option could be instead of running the cron job to update the clock once a day, I do it 4 times a day (so the changes should be < 1 second each time). But I'd prefer to fix this little issue. Also, forgot to mention, don't know if the clock is fast of slow. Here's a sample output: Code:
17 Jun 00:31:00 ntpdate[66266]: ntpdate 4.2.0-a Tue Jun 10 13:05:26 MST 2008 (1) 17 Jun 00:31:03 ntpdate[66266]: step time server 82.165.177.157 offset 1.870777 sec
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! Last edited by cajunman4life; 17th June 2008 at 07:46 AM. |
|
||||
Please see http://www.freebsd.org/doc/en/books/...twork-ntp.html for the proper configuration of syncing time with ntp. Doing it through cron is not advisable.
|
|
|||
Might want to check out Clockspeed, as well
ports/sysutils/clockspeed ports/sysutils/clockspeed-conf |
|
|||
I don't know why but I completely forgot about ntpd
I'll have a look at clockspeed also.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
|
|||
FYI - ntpd is working beautifully. When checking the time now, it is exactly (and I mean down to the second) the same time that my MacBook is... which is set to auto-update from time.apple.com.
So clearly it worked Thanks.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Weird time issues | schrodinger | OpenBSD General | 7 | 26th October 2009 03:20 PM |
Time for a New Laptop | harold | FreeBSD General | 4 | 5th October 2009 05:56 AM |
NFS time outs | trilog | General software and network | 1 | 5th May 2009 07:21 AM |
Set time in Jail | tanked | FreeBSD General | 5 | 22nd August 2008 01:51 PM |
Real Time OS | corey_james | Off-Topic | 2 | 11th July 2008 02:56 PM |