8

I have an HPUX NTP Server. It is the server for a dumb client device that has NTP built-in. I can tell the client the server IP and interval but cannot get any logging out.

How do I know if NTP syncronization is taking place.

Ordinarily, I would go to the client and run:

ntpq -p

but in this case the client can't do that. Is it possible to get a list of clients syncronized with my NTP server from the server itself?

Jonathan
  • 395
  • 2
  • 3
  • 13

3 Answers3

16

tcpdump port 123 ?

ntpdc -c monlist might also work as well, though I don't have a ntp server handy to test.

Wesley
  • 32,690
  • 9
  • 82
  • 117
devicenull
  • 5,622
  • 1
  • 26
  • 31
  • 1
    ntpdc -c monlist works properly here under various distribution of the ntp 4.2.4 release. – Magellan Feb 23 '12 at 00:33
  • 1
    I would add a `-n` to your ntpdc as well, just to speed things up, if you don't have reverse DNS setup for all your hosts. – Zoredache Feb 23 '12 at 00:38
  • @rany Why did you edit this? That was a very poor edit and did not properly contribute to the content. – Wesley Jan 11 '17 at 03:56
  • It is worth mentioning that if tcpdump is reporting Client lines but no Server lines, this means the NTP server is not responding. This might be due to a firewall or routing problem. – DustWolf Jul 07 '20 at 14:46
  • The monlist command won't work on a well-secured system because of a security vulnerability. – Thagomizer Aug 15 '20 at 04:47
2
#ntpdc -c monlist

will show exactly what clients are being served by the NTP server. However, I suggest to do ntp service restart prior to listing. This is because, the list will contain old clients as well, including ones which might be listened long back and then removed from the network/decommissioned.

#service ntpd restart 
#ntpdc -c monlist 

This will give you exactly the current data.

Jenny D
  • 27,780
  • 21
  • 75
  • 114
0

You can check for traffic from the device to be sure synchronizing is attempted (named in the other answers) but the device still has to do something with the answer. Without (remote) logging or some status display you can't say for sure the device is synchronized.

Koos van den Hout
  • 1,096
  • 6
  • 10