Sponsored Content
Full Discussion: Tracking NTP Clients
Top Forums UNIX for Advanced & Expert Users Tracking NTP Clients Post 302245999 by otheus on Sunday 12th of October 2008 08:16:31 AM
Old 10-12-2008
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.
 

10 More Discussions You Might Find Interesting

1. Solaris

ntp server and ntp client

All, How do you set a Solaris 9 server which received ntp updates from a ntp server to broadcast them on a local subnet. I have created a /etc/inet/ntp.conf file to receive the updates from a server on network and need to make this server become like a ntp relay from the main server. Any... (1 Reply)
Discussion started by: bubba112557
1 Replies

2. UNIX for Advanced & Expert Users

Command Tracking

Hi, OS: Solaris9, SPARC Is there any way I can track the commands run by users from the shell prompt? Example: Somebody is deleting files from the system. Who it is is a mystery. That person obviously does not use bash prompt so there is no history. Is there anyway I can find out who... (5 Replies)
Discussion started by: mahatma
5 Replies

3. UNIX for Advanced & Expert Users

Tracking user

dear all, I'm facing problem that is i have noticed from few days back that some body is deleting and making changes in the file from developement server where i'm working(in unix) so i want to track that who is using the server, what performancr they are doing and each every thing which r... (5 Replies)
Discussion started by: panknil
5 Replies

4. AIX

NTP server with aix & wintel clients

Good morning to all, can someone advise me how to setup aix ntp server with aix & wintel clients? Secondly, I also require to enable the service to autostart on reboot, how do I configure this? Thirdly, how do I configure daily autosync between clients and server? Please advice, thanks.... (0 Replies)
Discussion started by: chongkls77
0 Replies

5. UNIX for Advanced & Expert Users

Tracking down the problem

Is there a way to track down what process is sending to a certain port? I have some thing pounding the network with requests to a multicast IP that doesn't exist. I have shut down all comms related processes and yet it is still there. Need a way to track the port or IP back to the process. Thanks... (3 Replies)
Discussion started by: mattmanuel
3 Replies

6. Linux

How often does Linux NTP server update its time with the external NTP server?

All here, thank you for listening. Now I've set up a Linux NTP server by adding a external windows NTP server in /etc/ntp.conf. Then I start the ntpd daemon. But how often does the Linux NTP server update its time with the external NTP server? I've looked up everywhere but found no information... (1 Reply)
Discussion started by: MichaelLi
1 Replies

7. Red Hat

Tracking Process to a particular

I've tried to see what I can find on my own but I'm coming up with goose eggs. Basically I was wondering if there was a way of querying the scheduler (or something similar) to track a process back to a particular CPU it's executing on at the time of the command. ps has a "cpu" output option but... (1 Reply)
Discussion started by: thmnetwork
1 Replies

8. Fedora

NTP Clients not sync

hi guys I have several Red Hat 5.7(7) all of them sync time with two NTP Servers based on Windows but the issue is I configure the NTP service, I start the ntp service and use ntpdate -u to set the time the first time This is what I do 1. Configure /etc/ntp.conf restrict default kod... (2 Replies)
Discussion started by: karlochacon
2 Replies

9. HP-UX

Setting up NTP HP-UX clients from solaris NTP server

Hi I wonder if its possible to setup NTP clients running HP-UX o.s. from a solaris 10 NTP server? FR (3 Replies)
Discussion started by: fretagi
3 Replies

10. Red Hat

Ntp client sync with local over ntp server

Hi, I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local? # ntpq -p ... (3 Replies)
Discussion started by: pjeedu2247
3 Replies
NTPDC(1)							Programmer's Manual							  NTPDC(1)

NAME
ntpdc - vendor-specific NTP query program SYNOPSIS
ntpdc [-flag [value]]... [--opt-name [[=| ]value]]... [ host ...] DESCRIPTION
This manual page briefly documents the ntpdc command. The [= prog-name =] utility program is used to query an NTP daemon about its current state and to request changes in that state. It uses NTP mode 7 control message formats described in the source code. The program may be run either in interactive mode or controlled using command line arguments. Extensive state and statistics information is available through the [= prog-name =] interface. In addition, nearly all the configuration options which can be specified at startup using ntpd's configura- tion file may also be specified at run time using [= prog-name =] . OPTIONS
-4, --ipv4 Force IPv4 DNS name resolution. This option must not appear in combination with any of the following options: ipv6. Force DNS resolution of following host names on the command line to the IPv4 namespace. -6, --ipv6 Force IPv6 DNS name resolution. This option must not appear in combination with any of the following options: ipv4. Force DNS resolution of following host names on the command line to the IPv6 namespace. -c cmd, --command=cmd run a command and exit. This option may appear an unlimited number of times. The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified host(s). -l, --listpeers Print a list of the peers. This option must not appear in combination with any of the following options: command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'listpeers' interactive command. -p, --peers Print a list of the peers. This option must not appear in combination with any of the following options: command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'peers' interactive command. -s, --showpeers Show a list of the peers. This option must not appear in combination with any of the following options: command. Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the 'dmpeers' interactive command. -i, --interactive Force ntpq to operate in interactive mode. This option must not appear in combination with any of the following options: command, listpeers, peers, showpeers. Force ntpq to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input. -d, --debug-level Increase output debug message level. This option may appear an unlimited number of times. Increase the debugging message output level. -D string, --set-debug-level=string Set the output debug message level. This option may appear an unlimited number of times. Set the output debugging level. Can be supplied multiple times, but each overrides the previous value(s). -n, --numeric numeric host addresses. Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names. -?, --help Display extended usage information and exit. -!, --more-help Extended usage information passed thru pager. -> [rcfile], --save-opts[=rcfile] Save the option state to rcfile. The default is the last configuration file listed in the OPTION PRESETS section, below. -< rcfile, --load-opts=rcfile, --no-load-opts Load options from rcfile. The no-load-opts form will disable the loading of earlier RC/INI files. --no-load-opts is handled early, out of order. - [{v|c|n}], --version[={v|c|n}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. OPTION PRESETS
Any option that is not marked as not presettable may be preset by loading values from configuration ("RC" or ".INI") file(s) and values from environment variables named: NTPDC_<option-name> or NTPDC The environmental presets take precedence (are processed later than) the configuration files. The homerc files are "$HOME", and ".". If any of these are directories, then the file .ntprc is searched for within those directories. AUTHOR
David L. Mills and/or others Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org see html/copyright.html This manual page was AutoGen-erated from the ntpdc option definitions. ( 4.2.6) 2009-12-10 NTPDC(1)
All times are GMT -4. The time now is 07:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy