How to configure sntp client with multiple time sources?

 
Thread Tools Search this Thread
Operating Systems Linux SuSE How to configure sntp client with multiple time sources?
# 1  
Old 09-24-2015
How to configure sntp client with multiple time sources?

Hi,

What is the syntax to configure sntp client to have multiple time sources?
I tried to use the below syntax, but when the src1 is not reachable, the sntp does not even try to sync to src2:

Code:
# /usr/sbin/sntp -P no -r src1 src2
sntp: receive timed out after 3 seconds
sntp: receive timed out after 3 seconds
sntp: receive timed out after 3 seconds
sntp: receive timed out after 3 seconds
sntp: receive timed out after 3 seconds
sntp: not enough valid responses received in time

Also, it is not very clear if the sntp client will always use round robin when multiple sources or only if the first fails?

Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Firewalld - multiple services / sources?

If you have a system with one network interface, and you want to allow ssh from some addresses, freeipa-ldap from others, and https (which is part of freeipa-ldap) from another one; and you do not want to have a sea of rich rules... how do you do that? I can't tell if firewalld is just really... (2 Replies)
Discussion started by: jnojr
2 Replies

2. Solaris

Configure Solaris 10 as a RADIUS Client

Hello, I have a solaris 10 U 8 and want it to authenticate any user against a remote RADIUS server and return it's appropriate privileges on the system First is it possible? and if yes, How I can do it? please a consider I'm a little "newbie" on Solaris world Thanks in advance! (0 Replies)
Discussion started by: basim
0 Replies

3. Shell Programming and Scripting

unable to configure NIS client server

Dear all, I am using solaris 10 OS. I configured NIS server and i also configured NIS client server but when i use the command ypinit -s sunserv1 in NIS client it is showing me the below error. Enumerates maps from sunserv1. please check that it is running. (2 Replies)
Discussion started by: bhargav90
2 Replies

4. Solaris

Cannot configure NTP client

Hi, I am trying to configure NTP client on my Solaris server, but I am getting error like: Jan 13 10:53:33 SPOTS ntpdate: no server suitable for synchronization foundMy ntp.conf file: bash-3.00# pwd /etc/inet bash-3.00# bash-3.00# bash-3.00# cat ntp.conf # ident "@(#)ntp.client... (5 Replies)
Discussion started by: nypreH
5 Replies

5. AIX

aix-configure nim client

:b:Hi... I need help to configure nim client on nim server.. can i define aix 5.3.4.0 on aix 5.3.7.0 nim server.. while i m configuring nim client on nim server its getting msg that images not same.. i need to confirm that both version should be same or not.. Thanks.. (5 Replies)
Discussion started by: sumathi.k
5 Replies

6. Solaris

How to configure netbackup client in Solaris 9 & 10

Hi Experts Though I am aware that I am asking some thing which I should not ask here, however I am sure that there are many who must be have configure netback client in solaris 9 and 10. Please help /direct me towards some link as how and what all is required to configure Veritas... (4 Replies)
Discussion started by: kumarmani
4 Replies

7. SCO

configure client for internet !

i m using SCO unix openserver 5.0.... on my client machine. i have assign static IP to it and can ping the server. but now i want to connect internet on it through LAN , don't know how to do that?/ like in redhat linux we add dns or gatway entry to the /etc/resolv.conf don't know about SCO unix... (2 Replies)
Discussion started by: alamlinux
2 Replies

8. Red Hat

How to configure a Redhat 9.0 as NIS+ client

I would like to know how to configure a Redhat 9.0 as NIS+ client. I have seen the post of larry, but it is not enough information for me to do the configuration. Could anyone tell me how to do it? Please help! Thank you! (3 Replies)
Discussion started by: alexhon
3 Replies

9. IP Networking

Howto configure AIX DHCP Client ?

I use DHCP on my AIX box at home . I want to connect to my Cable ISP as a DHCP Client . the thing I did was this : smit Communications Applications and Services TCP/IP Use DHCP for TCPIP Configuration and Startup "Select the interface you want to use" en0 "Enter a hostname" OK after... (3 Replies)
Discussion started by: zumbi
3 Replies
Login or Register to Ask a Question
sntp(1) 							   User Commands							   sntp(1)

NAME
sntp - standard Simple Network Time Protocol client program SYNOPSIS
sntp [-flags] [-flag [value]] [--option-name[[=| ]value]] [ hostname-or-IP ...] DESCRIPTION
sntp can be used as an SNTP client to query a NTP or SNTP server and either display the time or set the local system's time (given suitable privilege). It can be run as an interactive command or from a cron job. NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol) are defined and described by RFC 5905. The default is to write the estimated correct local date and time (i.e. not UTC) to the standard output in a format like: '1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN' where the '(+0800)' means that to get to UTC from the reported local time one must add 8 hours and 0 minutes, the '+4.567' indicates the local clock is 4.567 seconds behind the correct time (so 4.567 seconds must be added to the local clock to get it to be correct). Note that the number of decimals printed for this value will change based on the reported preci- sion of the server. '+/- 0.089' is the reported synchronization distance (in seconds), which represents the maximum error due to all causes. If the server does not report valid data needed to calculate the synchronization distance, this will be reported as '+/- ?'. If the host is different from the IP, both will be displayed. Otherwise, only the IP is displayed. Finally, the stratum of the host is reported and the leap indicator is decoded and displayed. 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 the 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 the following host names on the command line to the IPv6 namespace. -a auth-keynumber, --authentication=auth-keynumber Enable authentication with the key auth-keynumber. This option takes an integer number as its argument. Enable authentication using the key specified in this option's argument. The argument of this option is the keyid, a number speci- fied in the keyfile as this key's identifier. See the keyfile option (-k) for more details. -b broadcast-address, --broadcast=broadcast-address Listen to the address specified for broadcast time sync. This option may appear an unlimited number of times. If specified sntp will listen to the specified address for NTP broadcasts. The default maximum wait time can (and probably should) be modified with -t. -c host-name, --concurrent=host-name Concurrently query all IPs returned for host-name. This option may appear an unlimited number of times. Requests from an NTP "client" to a "server" should never be sent more rapidly than one every 2 seconds. By default, any IPs returned as part of a DNS lookup are assumed to be for a single instance of ntpd, and therefore sntp will send queries to these IPs one after another, with a 2-second gap in between each query. The -c or --concurrent flag says that any IPs returned for the DNS lookup of the supplied host-name are on different machines, so we can send concurrent queries. -d, --debug-level Increase debug verbosity level. This option may appear an unlimited number of times. -D number, --set-debug-level=number Set the debug verbosity level. This option may appear an unlimited number of times. This option takes an integer number as its argument. -g milliseconds, --gap=milliseconds The gap (in milliseconds) between time requests. This option takes an integer number as its argument. The default milliseconds for this option is: 50 Since we're only going to use the first valid response we get and there is benefit to specifying a good number of servers to query, separate the queries we send out by the specified number of milliseconds. -K file-name, --kod=file-name KoD history filename. The default file-name for this option is: /var/db/ntp-kod Specifies the filename to be used for the persistent history of KoD responses received from servers. If the file does not exist, a warning message will be displayed. The file will not be created. -k file-name, --keyfile=file-name Look in this file for the key specified with -a. The default file-name for this option is: /etc/ntp.keys This option specifies the keyfile. sntp will search for the key specified with -a keyno in this file. See ntp.keys(5) for more information. -l file-name, --logfile=file-name Log to specified logfile. This option causes the client to write log messages to the specified logfile. -M number, --steplimit=number Adjustments less than steplimit msec will be slewed. This option takes an integer number as its argument. The value of number is constrained to being: greater than or equal to 0 If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime(2). Otherwise, step the correction using settimeofday(2). The default value is 0, which means all adjustments will be stepped. This is a feature, as different situations demand different values. -o number, --ntpversion=number Send int as our NTP protocol version. This option takes an integer number as its argument. The value of number is constrained to being: in the range 0 through 7 The default number for this option is: 4 When sending requests to a remote server, tell them we are running NTP protocol version ntpversion . -r, --usereservedport Use the NTP Reserved Port (port 123). Use port 123, which is reserved for NTP, for our network communications. -S, --step OK to 'step' the time with settimeofday(2). -s, --slew OK to 'slew' the time with adjtime(2). -t seconds, --timeout=seconds The number of seconds to wait for responses. This option takes an integer number as its argument. The default seconds for this option is: 5 When waiting for a reply, sntp will wait the number of seconds specified before giving up. The default should be more than enough for a unicast response. If sntp is only waiting for a broadcast response a longer timeout is likely needed. --wait, - Fl -no-wait Wait for pending replies (if not setting the time). The no-wait form will disable the option. This option is enabled by default. If we are not setting the time, wait for all pending responses. -?, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -> [cfgfile], --save-opts [=cfgfile] Save the option state to cfgfile. The default is the last configuration file listed in the OPTION PRESETS section, below. The com- mand will exit after updating the config file. -< cfgfile, --load-opts=cfgfile, --no-load-opts Load options from cfgfile. The no-load-opts form will disable the loading of earlier config/rc/ini files. --no-load-opts is han- dled early, out of order. --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: SNTP_<option-name> or SNTP 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. USAGE
sntp ntpserver.somewhere is the simplest use of this program and can be run as an unprivileged command to check the current time and error in the local clock. sntp -Ss -M 128 ntpserver.somewhere With suitable privilege, run as a command or from a cron(8) job, sntp -Ss -M 128 ntpserver.somewhere will request the time from the server, and if that server reports that it is synchronized then if the offset adjustment is less than 128 milliseconds the correc- tion will be slewed, and if the correction is more than 128 milliseconds the correction will be stepped. sntp -S ntpserver.somewhere With suitable privilege, run as a command or from a cron(8) job, sntp -S ntpserver.somewhere will set (step) the local clock from a synchronized specified server, like the (deprecated) ntpdate(1), or rdate(8) commands. ENVIRONMENT
See OPTION PRESETS for configuration environment variables. FILES
See OPTION PRESETS for configuration files. EXIT STATUS
One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) The operation failed or the command syntax was not valid. 66 (EX_NOINPUT) A specified configuration file could not be loaded. 70 (EX_SOFTWARE) libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. AUTHORS
Johannes Maximilian Kuehn Harlan Stenn Dave Hart COPYRIGHT
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. BUGS
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org NOTES
This manual page was AutoGen-erated from the sntp option definitions. 4.2.8p13 20 Feb 2019 sntp(1)