Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Speaking of time

    1.2.1-RC Snapshot Feedback and Problems-RETIRED
    6
    12
    6.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chpalmerC
      chpalmer
      last edited by

      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…

      Triggering snowflakes one by one..
      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

      1 Reply Last reply Reply Quote 0
      • N
        nocer
        last edited by

        Hi

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

        Cheers,

        1 Reply Last reply Reply Quote 0
        • G
          gionni
          last edited by

          @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 ?

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • chpalmerC
              chpalmer
              last edited by

              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

              Triggering snowflakes one by one..
              Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

              1 Reply Last reply Reply Quote 0
              • C
                cmb
                last edited by

                It's OpenBSD ntpd, you can find details in its documentation.
                http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd
                http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd.conf

                1 Reply Last reply Reply Quote 0
                • chpalmerC
                  chpalmer
                  last edited by

                  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.

                  Triggering snowflakes one by one..
                  Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cmb
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • chpalmerC
                      chpalmer
                      last edited by

                      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!

                      Triggering snowflakes one by one..
                      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wallabybob
                        last edited by

                        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

                        1 Reply Last reply Reply Quote 0
                        • W
                          wallabybob
                          last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • D
                            drees
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.