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

Dashboard - NTP widget Server Time

Scheduled Pinned Locked Moved webGUI
13 Posts 4 Posters 1.4k Views
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.
  • A
    anthonys
    last edited by anthonys May 9, 2023, 6:11 AM May 9, 2023, 6:07 AM

    (pfsense+ 23.01)
    Considering the 3 dashboard widgets

    • System Information
    • Traffic Graphs
    • NTP Status

    At the instant that the System Information does its regular refresh, the displayed System Date/Time is accurate to within a second of the real time.

    The Traffic Graphs widget, with its default refresh interval of 1s, also always displays the current time within a second on its x axes.

    NTP widget however, which one might expect to be the widget to get Server Time right, refreshes every second, but, is often incorrect by at least several seconds, and on some occasions I have seen it off by several minutes.

    Anyone else seeing this behaviour? If System Information and Traffic can get it right, it seems possible. Is this a bug/defect in the implementation of the NTP dashboard widget?

    G 1 Reply Last reply May 9, 2023, 7:16 AM Reply Quote 0
    • G
      Gertjan @anthonys
      last edited by May 9, 2023, 7:16 AM

      @anthonys

      The "NTP" is showing the real, correct time.
      This "NTP" time isn't copied into the system time like that. If the system lags behind, it will slowly get accelerated, to sync up with the NTP source. And the other way around if needed.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • A
        anthonys
        last edited by anthonys May 9, 2023, 7:44 AM May 9, 2023, 7:36 AM

        @gertjan said in Dashboard - NTP widget Server Time:

        The "NTP" is showing the real, correct time.

        Thank you for your response, but I am pretty sure the NTP widget is not showing the correct time.
        I can see the real correct time displayed in the 2 other widgets, and also if I execute "date" in a shell on the pfsense console - the pfsense system itself does have the correct time. The system has been up and ntp sync'ed for several weeks.
        It is the NTP widget alone that doesn't display the correct time - as I said, the widget is usually several seconds slow, and can on occasion display several minutes behind the real correct time (e.g., as shown by executing "date"). I have reproduced this issue on a number of pfsense systems.

        G 1 Reply Last reply May 9, 2023, 8:33 AM Reply Quote 0
        • G
          Gertjan @anthonys
          last edited by May 9, 2023, 8:33 AM

          @anthonys said in Dashboard - NTP widget Server Time:

          Thank you for your response, but I am pretty sure the NTP widget is not showing the correct time.

          Run

          ntpq -c rv
          
          associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
          version="ntpd 4.2.8p15@1.3728-o Thu Oct 27 06:57:25 UTC 2022 (1)",
          processor="amd64", system="FreeBSD/14.0-CURRENT", leap=00, stratum=3,
          precision=-23, rootdelay=30.077, rootdisp=27.902, refid=92.243.6.5,
          reftime=e80472fc.6a6ab035  Tue, May  9 2023  9:21:32.415,
          clock=e80477a5.ac0e093f  Tue, May  9 2023  9:41:25.672, peer=1214, tc=9,
          mintc=3, offset=-0.097015, frequency=+18.508, sys_jitter=0.886638,
          clk_jitter=0.308, clk_wander=0.019, tai=37, leapsec=201701010000,
          expire=202306280000
          

          "leap_none" means it's in a synced state.

          The GUI, the widget, is what it says it : a widget. That's close family to 'gadget' ;)
          If you need the real time : go command line ^^
          The GUI might be off a second or so.

          Still, I would trust the NTP far more a any build in clock.
          Mine is also off half a second - I guess.

          https://docs.netgate.com/pfsense/en/latest/troubleshooting/time-synchronization.html

          My pfSense NTP statistics

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          A 1 Reply Last reply May 9, 2023, 8:46 AM Reply Quote 0
          • A
            anthonys @Gertjan
            last edited by anthonys May 9, 2023, 8:51 AM May 9, 2023, 8:46 AM

            @gertjan

            associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
            version="ntpd 4.2.8p15@1.3728-o Sat Jan  7 19:55:07 UTC 2023 (1)",
            processor="arm64", system="FreeBSD/14.0-CURRENT", leap=00, stratum=3,
            precision=-21, rootdelay=12.925, rootdisp=10.558, refid=22.205.164.25,
            reftime=e804847e.ba1aeec1  Tue, May  9 2023 18:36:14.726,
            clock=e80484bd.f1d5c9a9  Tue, May  9 2023 18:37:17.944, peer=38592, tc=6,
            mintc=3, offset=-0.305932, frequency=+13.614, sys_jitter=1.038518,
            clk_jitter=0.146, clk_wander=0.009
            

            leap_none, so the system is time synced.

            @gertjan said in Dashboard - NTP widget Server Time:

            The GUI might be off a second or so.

            A second or so, no problem. But several seconds (or minutes)? E.g., the widget's time is 20 seconds slow as I write this, and I have seen off by minutes.
            I get it, it only a widget so it isn't a big issue, but a bug nevertheless?

            V 1 Reply Last reply Sep 11, 2023, 11:35 PM Reply Quote 0
            • V
              Vollans @anthonys
              last edited by Sep 11, 2023, 11:35 PM

              @anthonys I'm seeing exactly the same thing here, especially on my work laptop.

              b989bb02-4e93-4f31-a0c9-75b733cdae11-image.png

              Once the dashboard page is refreshed it's fine, but as soon as the browser puts the tab to sleep it starts drifting. Time shown is definitely not from the clock.

              R 1 Reply Last reply Sep 13, 2023, 1:18 PM Reply Quote 0
              • R
                RobbieTT @Vollans
                last edited by RobbieTT Sep 13, 2023, 1:44 PM Sep 13, 2023, 1:18 PM

                @Vollans
                It's been noted before that the last clock you should ever look at is the NTP widget time.

                I have no idea why it has never been fixed when the underlying NTP data it allegedly represents works perfectly well. I guess it is not a priority or is just being left to die quietly and inaccurately.

                As it is, it is laughable that the generic & slow-update-rate 'Current date/time' clock is way more accurate than the 'NTP Server stratum 1' widget clock:

                 2023-09-13 at 14.36.15.png

                ☕️

                V 1 Reply Last reply Sep 13, 2023, 10:04 PM Reply Quote 2
                • V
                  Vollans @RobbieTT
                  last edited by Sep 13, 2023, 10:04 PM

                  @RobbieTT I'd rather it not show the time and just the status of the NTP server, GPS data, etc, than show the wrong time.

                  G 1 Reply Last reply Sep 14, 2023, 5:50 AM Reply Quote 1
                  • G
                    Gertjan @Vollans
                    last edited by Sep 14, 2023, 5:50 AM

                    @Vollans

                    Even better : don't keep the Dashboard open on your browser.
                    It's just a big screen with several indicators, to show you swiftly that "all goes well".

                    If you have to look at the dashboard all the time for some reason, open a second page, and look at this log file at the same time : Status > System Logs > System > GUI Service and now you see the impact the dashboard has on pfSEnse (the webserver and the sub system needed to collect all the data).

                    Side story :

                    0ac799b9-d42b-4410-a3c4-9b2ecae776bd-image.png

                    why are there no seconds shown here ?? Since Windows 11 came out, you have the choice to show seconds ( !! finally, after 25 years of windows development !!).
                    Because : The Windows Clock: Why Seconds took Years

                    The NTP widget on screen is a browser thing : a bunch of javascript callbacks : the browser show the page, and then, with a timer running in your browser, the shown info is updated in place.
                    Most of the dashboard info is shown like that, without regenerating the entire page and thus introducing flashed during update.
                    Why the back end code doesn't read the actual clock ? Dono. That's some kind of bug for sure.

                    Btw : I left my dashboard open for several minutes.
                    My Windows PC uses "192.168.1.1" == pfSense as a system time, not ntp.microsoft.com or some very remore time source.
                    So the pfSense internal time, and my PC time are close to within half a second or so.
                    And it stays like that.

                    This one :

                    e9f9faf6-129d-4d61-bf15-47a2a695c35e-image.png

                    is part of a widget that gets updated only ones a minute, or less.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    R V 2 Replies Last reply Sep 14, 2023, 7:16 AM Reply Quote 0
                    • R
                      RobbieTT @Gertjan
                      last edited by Sep 14, 2023, 7:16 AM

                      @Gertjan said in Dashboard - NTP widget Server Time:

                      ... look at this log file at the same time : Status > System Logs > System > GUI Service and now you see the impact the dashboard has on pfSEnse

                      What impact is that - the page you highlight is just the associated (trivial) logging for the GUI?

                      My Windows PC uses "192.168.1.1" == pfSense as a system time, not ntp.microsoft.com or some very remore time source.
                      So the pfSense internal time, and my PC time are close to within half a second or so.

                      I think you misunderstand how ntp works, how servers are selected under the FQDN or why it does work at distance. If your device really is using pfSense as an ntp source then the difference in clock times would be in μs or less - half a second would be junk.

                      This one :
                      e9f9faf6-129d-4d61-bf15-47a2a695c35e-image.png
                      is part of a widget that gets updated only ones a minute, or less.

                      Err, no. That date & time is as titled - the last time the config was changed. If that is updating once a minute then you have a problem.

                      ☕️

                      G 1 Reply Last reply Sep 14, 2023, 8:50 AM Reply Quote 0
                      • V
                        Vollans @Gertjan
                        last edited by Sep 14, 2023, 7:43 AM

                        @Gertjan said in Dashboard - NTP widget Server Time:

                        @Vollans

                        Even better : don't keep the Dashboard open on your browser.
                        It's just a big screen with several indicators, to show you swiftly that "all goes well".

                        It’s rare that I do, and when I do it’s for a specific reason, and I’d like the dashboard to be accurate. That day I had a very good reason to keep the dashboard open as it was a lot more practical than jumping between multiple tabs whilst doing my work as a substantial change occurred to my networking and I needed to ensure everything was still good and other bits coming live.

                        1 Reply Last reply Reply Quote 0
                        • G
                          Gertjan @RobbieTT
                          last edited by Sep 14, 2023, 8:50 AM

                          @RobbieTT said in Dashboard - NTP widget Server Time:

                          What impact is that - the page you highlight is just the associated (trivial) logging for the GUI?

                          Keep it open .... (it will auto refresh after xxxx seconds 😊 )
                          Or do the "real admin thing" :

                          tail -f /var/log/nginx.log
                          

                          which is the same thing.

                          It will do a continues scroll of nginx server messages, while the dashboard gets bombard with 'update' requests.

                          @RobbieTT said in Dashboard - NTP widget Server Time:

                          That date & time is as titled

                          Oops.
                          This one :
                          e51a3e62-f825-4b71-8b5f-3e773f8d0bf5-image.png

                          @RobbieTT said in Dashboard - NTP widget Server Time:

                          If that is updating once a minute then you have a problem

                          I agree.

                          @RobbieTT said in Dashboard - NTP widget Server Time:

                          I think you misunderstand how ntp works, how servers are selected under the FQDN or why it does work at distance. If your device really is using pfSense as an ntp source then the difference in clock times would be in μs or less - half a second would be junk.

                          1a087126-b059-4c62-a350-5eebbe0b017e-image.png

                          where 192.168.1.1 is 'pfSense".
                          On the NTP pfSense side I can see my devices using pfSense as a time source when packet capture the UDP 123 ports on my LANs.

                          On my PC, I typed 'time' and at the same moment, I showed the pfSense time with a scrolling script.
                          The difference was in the "milliseconds". I should use another method to scale out the human factor : that's me, my eyes.
                          Maybe still junk, but for what I'm doing here (work) it's good enough 😊
                          I was just doing a quick and dirty time comparison.

                          NTP : You saw the video ? I wouldn't be surprised that the time shown on the windows tray is also way off (hundreds of ms ?) as the entire Microsoft GUI is "real time" driven, the final GDI is not real time because : lowest priority.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          R 1 Reply Last reply Sep 14, 2023, 9:36 AM Reply Quote 0
                          • R
                            RobbieTT @Gertjan
                            last edited by Sep 14, 2023, 9:36 AM

                            @Gertjan

                            That is a trivial amount of logging and has no meaningful impact on the system at all.

                            Whilst I do retain a single Windows 10 server it is off over 99% of the time. Otherwise I just don't do Windows OS, only the 'nix family (macOS, Linux & BSD).

                            ☕️

                            1 Reply Last reply Reply Quote 0
                            • A anthonys referenced this topic on Sep 20, 2023, 4:20 AM
                            • R Ramosel referenced this topic on Sep 20, 2023, 1:38 PM
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                              This community forum collects and processes your personal information.
                              consent.not_received