1844325 Members
4934 Online
110230 Solutions
New Discussion

NTP Client

 
jeevarajkn
Frequent Advisor

NTP Client

Dear Gurus,

How to find all configured NTP clients from NTP server.
8 REPLIES 8
Fabio Ettore
Honored Contributor

Re: NTP Client

as from other thread:

Hi,

you could check contents of /etc/ntp.conf on server and line for "peer" will be clients or you can issue command

ntpq -p

and you could see clients in the first column "remote" (except LOCAL which of obviously is the local system). Instead in the second column "refid" you should see the NTP server.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
jeevarajkn
Frequent Advisor

Re: NTP Client

Hi Fabio

After excuting the ntpq -p command in NTP server iam getting below given output only.It doesnt given the NTP client informations.

remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 10 l 47 64 377 0.00 0.000 10.01
Fabio Ettore
Honored Contributor

Re: NTP Client

Hi,

ok, that shows the system is correctly aligned to itself but it seems that no NTP clients are pointing to it.
Have you configured any NTP clients on NTP server or a NTP server on NTP clients?
You should do that by ntp.conf (man xntpd) and start xntpd daemon.

Best regards,
Fabio
WISH? IMPROVEMENT!
jeevarajkn
Frequent Advisor

Re: NTP Client

Hi Fabio

NTP client is configured in many systems in my datacenter.

Please finf the ntpq -p out put from one of my ntp client

remote refid st t when poll reach delay offset disp
==============================================================================
*10.11.0.18 LOCAL(1) 11 u 59 64 377 0.20 -0.002 0.02

here 10.11.0.18 is my ntp server.

So could you please tell me why ntpq -p out put in NTP server is not giving client information.
Matti_Kurkela
Honored Contributor

Re: NTP Client

A NTP _client_ will not necessarily cause any permanent log entry or any other record to be stored at the server side.

There does not seem to be an option to configure the ntp server to log the client connections, so you'll probably have to detect the clients by monitoring the network connections.

NTP uses UDP port 123, so if you have tcpdump installed, you could run a command like this on the NTP server host:

tcpdump -p udp port 123 > /tmp/ntpconnect.log

Let it run for a day or two, then sort the log file by source address. You now have a list of machines that communicate with your server using NTP.

The tcpdump utility and its prerequisite, the libpcap library are easiest to install from HP Internet Express. For HP-UX 11.11: check your installation CD kits. For 11.23 and above, the Internet Express and its sub-packages are available for free from software.hp.com.

MK
MK
Fabio Ettore
Honored Contributor

Re: NTP Client

Hi,

I agree with Matti, it is not said that you can have the exact list of clients that point to your NTP server. My thoughts were for a simple NTP environment but you don't have to set the clients mandatorily.
You could take a network trace on NTP server to discriminate who is using the NTP service.

Best regards,
Fabio
WISH? IMPROVEMENT!
rick jones
Honored Contributor

Re: NTP Client

As implied by other postings, ntpq "peers" only shows places from which the given system is _getting_ time, not places to which the given system is _giving_ time.

Short of getting an enhancement to HP-UX xntpd to log client accesses, the aforementioned sniffing of port 123 traffic is really the only way to see which systems are querying a given time server.

Even then though it will not tell you that they are actually _using_ the time they get from that server. If they are (correctly) configured to get indications of time from three or more servers, they will query all their configured time sources, but only sync to one of them.

And your server syncing to itself - that is "ok" if all you really care about is having all the systems have the same idea of what time it is, but not ok if you want them to have some idea of the "real" time.
there is no rest for the wicked yet the virtuous have no pillows
jeevarajkn
Frequent Advisor

Re: NTP Client

Dear Guru,s

Thanks for valuable repplies.Any way tcpdumb is not isnatlled in my NTP server I want to go manually in each clients.