CL Command Reference - CHGNTPA

CL Command List > CHGNTPA Reference

Description:

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.

Restrictions:

. You must have input/output system configuration (*IOSYSCFG) special authority to run this command.


Examples:

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.