![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NTP server with aix & wintel clients | chongkls77 | AIX | 0 | 09-05-2007 10:53 PM |
| Multihomed DNS Clients? | deckard | IP Networking | 4 | 04-12-2007 09:57 PM |
| BOOTP on HP Thin clients | chuk_uka | Linux | 2 | 01-30-2006 04:21 AM |
| Please help.Thin clients connecting to SCO. | Chaitu.a | SCO | 1 | 07-18-2005 08:59 AM |
| FTP from AIX to 20 Windows clients | sharuvman | Shell Programming and Scripting | 2 | 03-28-2003 06:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Tracking NTP Clients
I need to find out the NTP Clients which are syncing with my NTP Server in a Unix(Linux/Solaris) Machine. For eg. How many Stratum 2 Servers sync the time with my Stratum1 Server. Is there any way to track it?
edit by bakunin: moving the thread to where it belongs: the technical forums. Last edited by bakunin; 10-04-2008 at 07:17 AM.. |
|
|||||
|
You can also turn on IP filtering/logging to log incoming packets to port 123. Both Solaris IPF and Linux iptables support this feature. It won't tell you what stratum were used, but you might be able to figure that out from the packet headers and set the filters appropriately.
|
|
|||||
|
MrC is so right! Just a few tweaks to get what you want. This monlist ALSO prints "peers", meaning Stratum 1 hosts. What I do is print the peers, and exclude those from the monlist. Observe: Code:
# get peers
/usr/sbin/ntpdc -n -c listpeers |awk '{print $2}' >/tmp/peers.$$
# get all hosts connected to this ntp server
/usr/sbin/ntpdc -c monlist |awk '{ print $1 }' |
fgrep -v -f /tmp/peers.$$ # exclude those from the first list
rm -f /tmp/peers.$$
Afterwards, you might want to do forward IP host resolution on the list. The reason I use the -n command is because the ntpdc output chops long hostnames off at a certain column, rendering the grep trick useless. |
![]() |
| Bookmarks |
| Tags |
| ntp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|