How can I query an NTP server under Windows?











up vote
45
down vote

favorite
15












I am not interested in synchronizing my local clock with the remote server. I only want to query it and print the result.



I would have assumed that there is a port of ntpq for Windows, but was unable to find any.



All other NTP clients I could find, they always want to install themselves as a service or make it otherwise clear that they want to synchronize my local time.










share|improve this question
























  • possible duplicate of How can I check a system's current NTP configuration?
    – slm
    Jun 2 '14 at 16:49















up vote
45
down vote

favorite
15












I am not interested in synchronizing my local clock with the remote server. I only want to query it and print the result.



I would have assumed that there is a port of ntpq for Windows, but was unable to find any.



All other NTP clients I could find, they always want to install themselves as a service or make it otherwise clear that they want to synchronize my local time.










share|improve this question
























  • possible duplicate of How can I check a system's current NTP configuration?
    – slm
    Jun 2 '14 at 16:49













up vote
45
down vote

favorite
15









up vote
45
down vote

favorite
15






15





I am not interested in synchronizing my local clock with the remote server. I only want to query it and print the result.



I would have assumed that there is a port of ntpq for Windows, but was unable to find any.



All other NTP clients I could find, they always want to install themselves as a service or make it otherwise clear that they want to synchronize my local time.










share|improve this question















I am not interested in synchronizing my local clock with the remote server. I only want to query it and print the result.



I would have assumed that there is a port of ntpq for Windows, but was unable to find any.



All other NTP clients I could find, they always want to install themselves as a service or make it otherwise clear that they want to synchronize my local time.







windows-7 windows ntp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 19 '12 at 19:18

























asked Jul 19 '12 at 15:20









Der Hochstapler

67.1k48230283




67.1k48230283












  • possible duplicate of How can I check a system's current NTP configuration?
    – slm
    Jun 2 '14 at 16:49


















  • possible duplicate of How can I check a system's current NTP configuration?
    – slm
    Jun 2 '14 at 16:49
















possible duplicate of How can I check a system's current NTP configuration?
– slm
Jun 2 '14 at 16:49




possible duplicate of How can I check a system's current NTP configuration?
– slm
Jun 2 '14 at 16:49










3 Answers
3






active

oldest

votes

















up vote
67
down vote



accepted










C:> w32tm /stripchart /computer:foo
Tracking foo [1.2.3.4].
The current time is 19/07/2012 17:39:48 (local time).
17:39:48 d:-00.0000840s o:-25.3004160s [@ | ]
17:39:50 d:-00.0000680s o:-25.3070080s [@ | ]
17:39:52 d:-00.0000690s o:-25.2987405s [@ | ]
17:39:54 d:-00.0000680s o:-25.3071530s [@ | ]
17:39:56 d:-00.0000690s o:-25.2993985s [@ | ]
17:39:58 d:-00.0000680s o:-25.3070270s [@ | ]


Wireshark shows NTP packets being generated by this. Some versions of w32tm have a /query option



C:>w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
Tracking us.pool.ntp.org [208.87.221.228:123].
Collecting 5 samples.
The current time is 19/07/2012 18:36:32.
18:36:32, +03.3575094s
18:36:34, +03.3573679s
18:36:37, +03.3572986s
18:36:39, +03.3570290s
18:36:41, +03.3565357s





share|improve this answer



















  • 1




    To my understanding the /query is to query configuration parameters. I used it all day :D
    – Der Hochstapler
    Jul 19 '12 at 17:26










  • This is perfect. Exactly what I needed. Thanks :)
    – Der Hochstapler
    Jul 19 '12 at 17:27










  • I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
    – Ozkan
    Jul 12 at 9:39












  • @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
    – RedGrittyBrick
    Jul 12 at 11:02


















up vote
9
down vote













Bytefusion's ntpquery seems to be incredibly old, but works. Sadly, it requires initial installation, but the application files will work fine when copied to another system.



enter image description here






share|improve this answer






























    up vote
    0
    down vote













    The latest and greatest NTP check tool I could find was this: https://www.galsys.co.uk/categories/ntp-server-checker.html



    enter image description here






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f451018%2fhow-can-i-query-an-ntp-server-under-windows%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      67
      down vote



      accepted










      C:> w32tm /stripchart /computer:foo
      Tracking foo [1.2.3.4].
      The current time is 19/07/2012 17:39:48 (local time).
      17:39:48 d:-00.0000840s o:-25.3004160s [@ | ]
      17:39:50 d:-00.0000680s o:-25.3070080s [@ | ]
      17:39:52 d:-00.0000690s o:-25.2987405s [@ | ]
      17:39:54 d:-00.0000680s o:-25.3071530s [@ | ]
      17:39:56 d:-00.0000690s o:-25.2993985s [@ | ]
      17:39:58 d:-00.0000680s o:-25.3070270s [@ | ]


      Wireshark shows NTP packets being generated by this. Some versions of w32tm have a /query option



      C:>w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
      Tracking us.pool.ntp.org [208.87.221.228:123].
      Collecting 5 samples.
      The current time is 19/07/2012 18:36:32.
      18:36:32, +03.3575094s
      18:36:34, +03.3573679s
      18:36:37, +03.3572986s
      18:36:39, +03.3570290s
      18:36:41, +03.3565357s





      share|improve this answer



















      • 1




        To my understanding the /query is to query configuration parameters. I used it all day :D
        – Der Hochstapler
        Jul 19 '12 at 17:26










      • This is perfect. Exactly what I needed. Thanks :)
        – Der Hochstapler
        Jul 19 '12 at 17:27










      • I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
        – Ozkan
        Jul 12 at 9:39












      • @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
        – RedGrittyBrick
        Jul 12 at 11:02















      up vote
      67
      down vote



      accepted










      C:> w32tm /stripchart /computer:foo
      Tracking foo [1.2.3.4].
      The current time is 19/07/2012 17:39:48 (local time).
      17:39:48 d:-00.0000840s o:-25.3004160s [@ | ]
      17:39:50 d:-00.0000680s o:-25.3070080s [@ | ]
      17:39:52 d:-00.0000690s o:-25.2987405s [@ | ]
      17:39:54 d:-00.0000680s o:-25.3071530s [@ | ]
      17:39:56 d:-00.0000690s o:-25.2993985s [@ | ]
      17:39:58 d:-00.0000680s o:-25.3070270s [@ | ]


      Wireshark shows NTP packets being generated by this. Some versions of w32tm have a /query option



      C:>w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
      Tracking us.pool.ntp.org [208.87.221.228:123].
      Collecting 5 samples.
      The current time is 19/07/2012 18:36:32.
      18:36:32, +03.3575094s
      18:36:34, +03.3573679s
      18:36:37, +03.3572986s
      18:36:39, +03.3570290s
      18:36:41, +03.3565357s





      share|improve this answer



















      • 1




        To my understanding the /query is to query configuration parameters. I used it all day :D
        – Der Hochstapler
        Jul 19 '12 at 17:26










      • This is perfect. Exactly what I needed. Thanks :)
        – Der Hochstapler
        Jul 19 '12 at 17:27










      • I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
        – Ozkan
        Jul 12 at 9:39












      • @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
        – RedGrittyBrick
        Jul 12 at 11:02













      up vote
      67
      down vote



      accepted







      up vote
      67
      down vote



      accepted






      C:> w32tm /stripchart /computer:foo
      Tracking foo [1.2.3.4].
      The current time is 19/07/2012 17:39:48 (local time).
      17:39:48 d:-00.0000840s o:-25.3004160s [@ | ]
      17:39:50 d:-00.0000680s o:-25.3070080s [@ | ]
      17:39:52 d:-00.0000690s o:-25.2987405s [@ | ]
      17:39:54 d:-00.0000680s o:-25.3071530s [@ | ]
      17:39:56 d:-00.0000690s o:-25.2993985s [@ | ]
      17:39:58 d:-00.0000680s o:-25.3070270s [@ | ]


      Wireshark shows NTP packets being generated by this. Some versions of w32tm have a /query option



      C:>w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
      Tracking us.pool.ntp.org [208.87.221.228:123].
      Collecting 5 samples.
      The current time is 19/07/2012 18:36:32.
      18:36:32, +03.3575094s
      18:36:34, +03.3573679s
      18:36:37, +03.3572986s
      18:36:39, +03.3570290s
      18:36:41, +03.3565357s





      share|improve this answer














      C:> w32tm /stripchart /computer:foo
      Tracking foo [1.2.3.4].
      The current time is 19/07/2012 17:39:48 (local time).
      17:39:48 d:-00.0000840s o:-25.3004160s [@ | ]
      17:39:50 d:-00.0000680s o:-25.3070080s [@ | ]
      17:39:52 d:-00.0000690s o:-25.2987405s [@ | ]
      17:39:54 d:-00.0000680s o:-25.3071530s [@ | ]
      17:39:56 d:-00.0000690s o:-25.2993985s [@ | ]
      17:39:58 d:-00.0000680s o:-25.3070270s [@ | ]


      Wireshark shows NTP packets being generated by this. Some versions of w32tm have a /query option



      C:>w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
      Tracking us.pool.ntp.org [208.87.221.228:123].
      Collecting 5 samples.
      The current time is 19/07/2012 18:36:32.
      18:36:32, +03.3575094s
      18:36:34, +03.3573679s
      18:36:37, +03.3572986s
      18:36:39, +03.3570290s
      18:36:41, +03.3565357s






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 19 '12 at 17:35

























      answered Jul 19 '12 at 16:46









      RedGrittyBrick

      66.4k12104160




      66.4k12104160








      • 1




        To my understanding the /query is to query configuration parameters. I used it all day :D
        – Der Hochstapler
        Jul 19 '12 at 17:26










      • This is perfect. Exactly what I needed. Thanks :)
        – Der Hochstapler
        Jul 19 '12 at 17:27










      • I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
        – Ozkan
        Jul 12 at 9:39












      • @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
        – RedGrittyBrick
        Jul 12 at 11:02














      • 1




        To my understanding the /query is to query configuration parameters. I used it all day :D
        – Der Hochstapler
        Jul 19 '12 at 17:26










      • This is perfect. Exactly what I needed. Thanks :)
        – Der Hochstapler
        Jul 19 '12 at 17:27










      • I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
        – Ozkan
        Jul 12 at 9:39












      • @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
        – RedGrittyBrick
        Jul 12 at 11:02








      1




      1




      To my understanding the /query is to query configuration parameters. I used it all day :D
      – Der Hochstapler
      Jul 19 '12 at 17:26




      To my understanding the /query is to query configuration parameters. I used it all day :D
      – Der Hochstapler
      Jul 19 '12 at 17:26












      This is perfect. Exactly what I needed. Thanks :)
      – Der Hochstapler
      Jul 19 '12 at 17:27




      This is perfect. Exactly what I needed. Thanks :)
      – Der Hochstapler
      Jul 19 '12 at 17:27












      I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
      – Ozkan
      Jul 12 at 9:39






      I don't know if this works as expected, because I receive a valid time whatever I put as computer value.
      – Ozkan
      Jul 12 at 9:39














      @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
      – RedGrittyBrick
      Jul 12 at 11:02




      @Ozkan ask a question 1) quoting what you saw and explaining 2) what you expected to see instead and 3) why.
      – RedGrittyBrick
      Jul 12 at 11:02












      up vote
      9
      down vote













      Bytefusion's ntpquery seems to be incredibly old, but works. Sadly, it requires initial installation, but the application files will work fine when copied to another system.



      enter image description here






      share|improve this answer



























        up vote
        9
        down vote













        Bytefusion's ntpquery seems to be incredibly old, but works. Sadly, it requires initial installation, but the application files will work fine when copied to another system.



        enter image description here






        share|improve this answer

























          up vote
          9
          down vote










          up vote
          9
          down vote









          Bytefusion's ntpquery seems to be incredibly old, but works. Sadly, it requires initial installation, but the application files will work fine when copied to another system.



          enter image description here






          share|improve this answer














          Bytefusion's ntpquery seems to be incredibly old, but works. Sadly, it requires initial installation, but the application files will work fine when copied to another system.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 23 '17 at 13:42









          zdzich

          85




          85










          answered Jul 19 '12 at 15:24









          Der Hochstapler

          67.1k48230283




          67.1k48230283






















              up vote
              0
              down vote













              The latest and greatest NTP check tool I could find was this: https://www.galsys.co.uk/categories/ntp-server-checker.html



              enter image description here






              share|improve this answer

























                up vote
                0
                down vote













                The latest and greatest NTP check tool I could find was this: https://www.galsys.co.uk/categories/ntp-server-checker.html



                enter image description here






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  The latest and greatest NTP check tool I could find was this: https://www.galsys.co.uk/categories/ntp-server-checker.html



                  enter image description here






                  share|improve this answer












                  The latest and greatest NTP check tool I could find was this: https://www.galsys.co.uk/categories/ntp-server-checker.html



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 3 at 17:45









                  Structed

                  11118




                  11118






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f451018%2fhow-can-i-query-an-ntp-server-under-windows%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido