ntp command

This command configures and displays the CMM network time protocol (NTP) settings.

If command syntax is not correctly entered, or if a command fails to run, an error message is returned. See Common errors for a list of error messages that apply to all commands or ntp command errors for a list of error messages that are specific to the ntp command.

Table 1. ntp command.

The command table is a multi-row, four-column table where each row describes a CMM CLI command option: column one lists command function, column two provides a detailed command description, column three shows command-option syntax, and column four lists valid command targets.

Function What it does Command Target (see paths in Command targets)
Display NTP settings Displays the NTP settings for the specified command target. Possible return values are:
  • -en state (enabled, disabled)
  • -i ipaddress/hostname (IP address or hostname of the NTP server)
  • -f update_frequency (NTP update frequency, in minutes)
  • -v3en state (enabled, disabled)
  • -v3 key_info (NTP v3 authentication entry)
Note: Return values vary based on command target.
ntp
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
I/O module:
  • switch[x]
  • where x is the I/O-bay number.
Enable / disable NTP Enables or disables NTP for the specified command target.

For I/O module targets, the ntp -en command enables or disables transfer of NTP information from the CMM to the I/O module; it does not change the NTP state of the I/O module.

ntp -en state

where state is enabled or disabled.

This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
I/O module:
  • switch[x]
  • where x is the I/O-bay number.
NTP server IP address or hostname - set Checks syntax and sets the IP address or hostname of the NTP server. ntp -i ipaddress/hostname

where ipaddress/hostname is the IP address or hostname of the NTP server.

This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
NTP update frequency - set Sets how often the clock in the specified command target is automatically updated by the NTP server. ntp -f time

where time is the NTP update frequency, in minutes with a maximum value of 45000.

This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
I/O module:
  • switch[x]
  • where x is the I/O-bay number.
NTP - Enable / disable V3 authentication Enables or disables V3 authentication between the CMM and the NTP server.
Note: The NTP server authentication key must be set, using the ntp -v3 command option, before enabling V3 authentication.
ntp -v3en state

where state is enabled or disabled .

This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
NTP server authentication key - set Sets the v3 authentication key that the CMM uses to access the NTP server. The authentication key contains the following values:
  • Key index: An NTP server can be configured with one or more key entries. The key index specifies which key the server expects the client to authenticate with.
  • Key type: The CMM supports only the SHA1 key type.
  • Key: The key is an 40-character ASCII string.
  • The ntp -v3key_index and key values must match the "key ID" and "password" values set on the NTP server. See the documentation for your NTP server for information about setting a key ID and password.
ntp -v3 key_indexkey_typekey

where:

  • key_index is from 1 to 65535, inclusive. If you enter a value outside this range, an error will be displayed.
  • key_type is SHA1.
  • key is a 40-character ASCII string.
This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
NTP clock- synchronize Synchronizes the CMM clock with the NTP server. (You must configure a valid NTP server before you can synchronize.) ntp -synch
This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis configuration
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.

Example:

To display NTP settings for the CMM, while the primary CMM in bay 2 is set as the persistent command environment, at the system:mm[2]> prompt, type
ntp

The following example shows the information that is returned from this command:

system:mm[2]> ntp
-en enabled
-i timeserver
-f 5
-v3en disabled
-v3 Not configured
NTP is disabled.
system:mm[2]>