Speaking of time



  • How often is the time service supposed to go out and look for an update to its time?

    I just restarted with the latest update and got

    Oct 16 07:06:09 ntpdate[325]: step time server 207.46.197.32 offset -1.569880 sec

    It appears it only looks once when its restarted by both whats in the log and the offset that is rather large after several days of no restarts…



  • Hi

    I've put ntpdate into crontab and sync system clock as scheduled just fine.

    Cheers,



  • @chpalmer:

    How often is the time service supposed to go out and look for an update to its time?

    I just restarted with the latest update and got

    Oct 16 07:06:09 ntpdate[325]: step time server 207.46.197.32 offset -1.569880 sec

    It appears it only looks once when its restarted by both whats in the log and the offset that is rather large after several days of no restarts…

    I had the same impression, shouldn't NTP being adjusting the time every moment, keeping a DRIFT file, and such ?



  • Yes, ntpdate runs at boot time to set the time, then ntpd runs while the system is up and keeps the clock synced from there. When you reboot you'll commonly end up a second or so off, just the nature of clocks in PC hardware. This isn't a problem.



  • I just updated a friends machine I set up 70 days ago. The time was off just over a minute. I see no evidence at all that the firewall is updating itself although my equipment syncs from the firewall just fine.

    What rate is the firewall supposed to look for updates?

    I had the log entry but my laptop battery went dead too quick





  • Thanks for the links.

    Found this..  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ntp.html

    "If you only wish to synchronize your clock when the machine boots up, you can use ntpdate(8). This may be appropriate for some desktop machines which are frequently rebooted and only require infrequent synchronization, but most machines should run ntpd(8).

    Using ntpdate(8) at boot time is also a good idea for machines that run ntpd(8). The ntpd(8) program changes the clock gradually, whereas ntpdate(8) sets the clock, no matter how great the difference between a machine's current clock setting and the correct time."

    Im still learning my way around Free BSD so please patient.  Are both ntpdate and ntpd used here? I only see the one log entry for ntpdate.



  • Yeah ntpd and ntpdate are both in use, ntpdate at boot time, ntpd runs always. If you go to status.php and check the ps output you'll see it there.



  • Thanks for your reply's on this.

    I am leaving my box here alone for the time being and will watch to see what happens. Today Im just over a second off.

    I do believe that this is something that would be about the 1.2 line in general unless the way ntpd is implemented has changed between release and 1.2.1

    I probably should have started this topic in the General forum.

    I am just having trouble seeing that any update to the pfsense box takes place after initial boot.

    At least Im learning a lot!



  • Perhaps all is not well in the ntpd world.

    I had configured pfSense to look to my ADSL modem as the ntp server. I don't know why I had done that, I now can't find any evidence it is capable of playing that role. ntpd didn't report any problem with this over at least ten days of uptime.

    The OpenBSD ntpd man page says:

    When ntpd receives a SIGINFO signal, it writes its peer and sensor status
        to syslog(3).

    I found two ntpd processes. I sent SIGINFO to both and even 30 minutes later there was no evidence of ntpd writing its peer and sensor status to syslog.

    Though ntpd is running, it doesn't appear to be doing what it should do.

    I'm running 1.2.1-RC1 built on Sat Oct 11 09:05:22 EDT 2008



  • Further to my previous reply, the OpenBSD man page for ntpd says

    When ntpd starts up, it reads settings from its configuration file, typically ntpd.conf(5), and its initial clock drift from /var/db/ntpd.drift. Clock drift is periodically written to the drift file thereafter.

    Its now more than 17 hours since I restarted ntpd and there is no file matching '*.drift' anywhere in the file system.



  • I suspect that the system clock isn't getting synced to the hardware/bios clock periodically, which should happen as the two can drift apart.

    On a Linux system, you would periodically call hwclock –systohc. Often this is called during shutdown/reboot as well.

    Not sure if there is a FreeBSD equivalent.


Log in to reply