Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Change Network Time Protocol Attributes (CHGNTPA) command is used to change configurable Simple Network Time Protocol (SNTP) service attributes. The changes take effect the next time the SNTP service is started either by the Start TCP/IP(STRTCP) command or by the Start TCP/IP Server (STRTCPSVR) command.
Most of the SNTP attributes have an initial value. The following figure shows the initial values, as shipped by IBM, for the command keyword parameters:
AUTOSTART *NO POLLITV 60 minutes MINADJ 20 milliseconds MAXADJ 20 minutes ADJTHLD *MAXADJ ACTLOG *NONE SVRAUTOSTR *NO SVRACTLOG *NONE SYNCRQD *NO |
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
RMTSYS | Remote system | Single values: *SAME, *NONE Other values (up to 3 repetitions): Character value |
Optional |
AUTOSTART | Client autostart | *SAME, *NO, *YES | Optional |
POLLITV | Client poll interval | 1-1440, *SAME | Optional |
MINADJ | Client minimum adjustment | 0-300000, *SAME, *NONE | Optional |
MAXADJ | Client maximum adjustment | 1-120, *SAME | Optional |
ADJTHLD | Client adjustment threshold | 1-7200, *SAME, *MAXADJ | Optional |
ACTLOG | Client activity log | *SAME, *NONE, *CHANGE, *POLL | Optional |
SVRAUTOSTR | Server autostart | *SAME, *NO, *YES | Optional |
SVRACTLOG | Server activity log | *SAME, *NONE, *ALL, *ERROR | Optional |
SYNCRQD | Synchronization required | *SAME, *NO, *YES | Optional |
Top |
Specifies one or more remote systems to which the SNTP client can connect for the time service. The first parameter value in the list that can provide valid time service will be selected. When the selected time server fails, a new time server will be selected. The remote system name must be valid, and the system must be able to communicate with the local system. The user can assign names to an internet address with the Work with TCP/IP host table entries option on the Configure TCP/IP menu (CFGTCP command). Also, a remote name server can be used to map remote system names to internet addresses.
A list of public time servers is maintained on the Internet. You can use a search engine with a query of "NTP servers", or refer to the resources in the SNTP topic in the iSeries Information Center. The time server should be selected based on minimum network response time delay at the location where the iSeries machine is installed. If a firewall is installed between the local system and the time server, the firewall configuration may need to be updated to allow the passing of UDP packets on port 123.
Single values
Other values (up to 3 repetitions)
Top |
Specifies whether to start the SNTP client automatically when TCP/IP is started using the Start TCP/IP (STRTCP) command, or by specifying SERVER(*AUTOSTART) on the Start TCP/IP Server (STRTCPSVR) command.
Top |
Specifies the time interval, in minutes, after which the SNTP client will connect to the NTP or SNTP time server in order to determine if the iSeries clock needs correction.
Top |
The threshold, in milliseconds, between the NTP or SNTP server time and the local clock time. When the difference is below this value, the local clock will not be adjusted.
Top |
The threshold, in minutes, between the NTP or SNTP server time and the local clock time. When the difference is above this value, the local clock will not be set/adjusted.
Top |
Specifies the threshold which determines whether changing the clock will require setting or adjusting the clock.
Top |
Specifies the activities which cause logging for updating the clock to be done. Logging entries are written to a file in directory /QIBM/USERDATA/OS400/TCPIP/NTP for the client.
Top |
Specifies whether to start the SNTP server automatically when TCP/IP is started by the Start TCP/IP (STRTCP) command or by specifying SERVER(*AUTOSTART) on the Start TCP/IP Server (STRTCPSVR) command.
Top |
Specifies the activities which cause logging for the SNTP server. Logging entries are written to a file in directory /QIBM/USERDATA/OS400/TCPIP/NTP/SERVER.
Top |
Specifies whether the SNTP system client must be synchronized with an external time server before valid time will be served.
Top |
Example 1: Setting the SNTP Client
CHGNTPA RMTSYS(AAAA.BBBBB.CCC)
This command sets the SNTP client server to be host name AAAA.BBBBB.CCC.
Example 2: Setting Clock Time Adjustment Thresholds
CHGNTPA MINADJ(50) MAXADJ(10)
This command sets the client minimum adjustment threshold to 50 milliseconds and the maximum adjustment threshold to 10 minutes. If the time value returned from the NTP or SNTP server system is more than 50 milliseconds and less than 10 minutes different from the local clock, the local clock will be set/adjusted.
Example 3: Setting the Clock Set/Adjustment threshold
CHGNTPA ADJTHLD(2)
This command sets the SNTP client set/adjustment threshold value to 2 seconds. For time difference between the NTP or SNTP server and SNTP clock of 2 seconds or less, the clock will be adjusted. For time difference greater than 2 seconds, a set of the clock will be done.
Example 4: Setting the SNTP Server to Require Synchronized Client
CHGNTPA SYNCRQD(*YES)
This command sets the SNTP server to require the system clock to be synchronized by the SNTP client. If the SNTP system clock has not been synchronized, an unsynchronized response code will be returned by the SNTP server. An unsynchronized condition can be caused by inability of the SNTP client to contact the SNTP server, an error condition to prevent the SNTP client from updating the system clock, or the adjustment of the system clock has not been completed.
Example 5: Setting the SNTP Client using multiple servers
CHGNTPA RMTSYS(AAAA.BBBBB.CCC DDD.EEE.FFF GGG.HHH.III)
This command sets the SNTP client clock server to be host names AAAA.BBBBB.CCC, DDD.EEE.FFF, and GGG.HHH.III. If a valid time cannot be obtained from server AAAA.BBBBB.CCC, the SNTP client will attempt to contact server DDD.EEE.FFF followed by GGG.HHH.III.
Example 6: Setting the Set/Adjustment threshold
CHGNTPA SVRAUTOSTR(*YES)
This command sets the SNTP server to start automatically when the command STRTCP is issued.
Top |
*ESCAPE Messages
Top |