The current status of NTP on an HMC can then be displayed using “hmc lsntp“:
$ hmc lsntp NAME XNTP XNTPSTATUS XNTPSERVER hmc01 disable - - hmc02 enable synchronized 192.168.189.77,192.168.189.78 hmc03 enable synchronized 192.168.189.77,192.168.189.78 $
Another NTP server can be added to the NTP configuration of an HMC using the “hmc addntpserver” command:
$ hmc addntpserver hmc01 192.168.189.77 $ hmc addntpserver hmc01 192.168.189.78 $
A check with “hmc lsntp” shows that two NTP servers are now configured, but NTP is still not activated:
$ hmc lsntp hmc01 NAME XNTP XNTPSTATUS XNTPSERVER hmc01 disable - 192.168.189.77,192.168.189.78 $
NTP can now be activated with the command “hmc enablentp“:
$ hmc enablentp hmc01 $
The first sync may take a while:
$ hmc lsntp hmc01 NAME XNTP XNTPSTATUS XNTPSERVER hmc01 enable unsynchronized 192.168.189.77,192.168.189.78 $
The time on the HMC is not yet synchronized immediately after enabling NTP (XNTPSTATUS: unsynchronized).
A detailed status for each NTP server can be obtained by using the “-a” option (all NTP servers):
$ hmc lsntp –a hmc01 NAME SERVER STATE POLL_FREQ_SECONDS SECONDS_SINCE_LAST_POLL hmc01 192.168.189.77 not connected 64 0 hmc01 192.168.189.78 not connected 64 0 $
As soon as synchronization with one of the NTP servers is achieved, the overall status is synchronized:
$ hmc lsntp hmc01 NAME XNTP XNTPSTATUS XNTPSERVER hmc01 enable synchronized 192.168.189.77,192.168.189.78 $
A more detailed description can be found here: NTP Configuration on the HMC
The LPAR tool can be downloaded for testing here: Download