Viewing the Current NTP Configuration
To read the current NTP configuration, we use the -r option:
[root@gluon_50 ~ 13]# syscfg -r -u ntp SIP10.0.0.0:ST0:S1IP [root@gluon_50 ~ 14]#
Decoding the fields according to the help, the NTP service is off for this CTP, and the server IP is set to 10.0.0.0 (which is a default bogus IP). As a general rule, you can take the same string that is returned from a read operation, and use it as the basis for a set operation, and it should accept the configuration. And if you can then read it back, you know that it was accepted by syscfg and applied:
[root@gluon_50 ~ 13]# syscfg -r -u ntp SIP10.0.0.0:ST0:S1IP [root@gluon_50 ~ 14]# syscfg -s -u ntp -v "SIP10.0.0.0:ST0:S1IP" [root@gluon_50 ~ 15]# syscfg -r -u ntp SIP10.0.0.0:ST0:S1IP [root@gluon_50 ~ 16]#
So if we want to activate NTP on this CTP to a server IP of 172.25.61.12:
[root@gluon_50 ~ 16]# proc ntp [root@gluon_50 ~ 17]# syscfg -s -u ntp -v "SIP172.25.61.12:ST1:S1IP" <<< messages here associated with NTP startup >>> [root@gluon_50 ~ 18]# proc ntp 32673 ? SNL 0:00 ntpd -p /var/run/ntpd.pid -g [root@gluon_50 ~ 19]# syscfg -r -u ntp SIP172.25.61.12:ST1:S1IP [root@gluon_50 ~ 20]# t
Note that, when I read back the config string, it comes back exactly as configured, which is a good way to verify that the configuration was accepted.
(FYI, The "proc" alias just searches running processes on the CTP, and is used to show that the ntp daemon was not running before, and starts up based on the syscfg command.)
At this point, if you want to keep the configuration, but disable NTP, all you need to do is read the config, set ST1 to ST0, and write it back.
[root@gluon_50 ~ 21]# syscfg -r -u ntp SIP172.25.61.12:ST1:S1IP [root@gluon_50 ~ 22]# syscfg -s -u ntp -v "SIP172.25.61.12:ST0:S1IP" Shutting down ntpd: [ OK ] [root@gluon_50 ~ 23]# syscfg -r -u ntp SIP172.25.61.12:ST0:S1IP [root@gluon_50 ~ 24]#
These basic rules apply to many of the syscfg utilities.