NTP Commands

The NTP commands are not supported on connector AMI.

connectorctl ntp config

To configure the Network Time Protocol (NTP) server, use the connectorctl ntp config command.

connectorctl ntp config { -n comma-separated-list-of-servers | -d }

Syntax Description

Keywords and Variables Description
-n comma-separated-list-of-servers

List of NTP servers. Ensure that you separate each server name with a comma.

-d

Deletes the current NTP configurations.

Command History

Release 3

This command is introduced.

Examples

The following example shows how to configure the NTP server:
[spacesadmin@Connector3-June2024 ~]$ connectorctl sshd hostkey show
        Executing command:sshd
        Command execution status:Success
        -----------------------
        List of supported host Key algorithms is:
        hostkeyalgorithms *

Examples

The following example shows how to configure the NTP server:
[spacesadmin@Connector3-June2024 ~]$ connectorctl sshd hostkey reset
        Executing command:sshd
        Command execution status:Success
        -----------------------
        Successfully reset key exchange algorithms configuration
        [spacesadmin@Connector3-June2024 ~]$ connectorctl sshd hostkey remove -a
        Executing command:sshd
        Command execution status:Success
        -----------------------
        Removing all unsupported weak algorithms
        Successfully removed x509v3-ecdsa-sha2-nistp256,x509v3-ecdsa-sha2-nistp384,x509v3-ecdsa-sha2-nistp521,x509v3-ssh-rsa,x509v3-rsa2048-sha256,x509v3-sign-rsa,,,ssh-ed25519,,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa key exchange algorithm(s)

Examples

The following example shows how to configure the NTP server:
[spacesadmin@Connector3-June2024 ~]$ connectorctl sshd hostkey remove -r x509v3-ecdsa-sha2-nistp256,x509v3-ecdsa-sha2-nistp384
        Executing command:sshd
        Command execution status:Success
        -----------------------
        Successfully removed ,,x509v3-ecdsa-sha2-nistp521,x509v3-ssh-rsa,x509v3-rsa2048-sha256,x509v3-sign-rsa,x509v3-sign-dss,x509v3-ssh-dss,ssh-ed25519,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa key exchange algorithm(s)

connectorctl ntp show

This command shows the Network Time Protocol (NTP) server.

connectorctl ntp show

Syntax Description

This command has no keywords or arguments.

Command History

Release 3

This command is introduced.

Examples

The following is a sample output of the command:
[spacesadmin@connector ~]$ connectorctl ntp show            
Executing command:ntp
Command execution status:Success
-----------------------
=================chrony conf output=================
server ntp.esl.cisco.com
========================end=========================

connectorctl ntp status

To observe the status of chrony or Network Time Protocol (NTP) service, sources details, and NTP data details, use the connectorctl ntp restart command.

connectorctl ntp status

Syntax Description

This command has no keywords or arguments.

Command History

Release 3

This command is introduced.

Examples

The following is a sample output of the command:
[spacesadmin@connector ~]$ connectorctl network status             
Executing command:ntp
Command execution status:Success
-----------------------
=================chrony service status=================
chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-07-28 12:20:58 PDT; 5 days ago
     Docs: man:chronyd(8)
           man:chrony.conf(5)
  Process: 895 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
  Process: 871 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 877 (chronyd)
    Tasks: 1 (limit: 24285)
   Memory: 2.3M
   CGroup: /system.slice/chronyd.service
           └─877 /usr/sbin/chronyd

Jul 28 12:20:55 conn3-la61-212-23 systemd[1]: Starting NTP client/server...
Jul 28 12:20:56 conn3-la61-212-23 chronyd[877]: chronyd version 4.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 +DEBUG)
Jul 28 12:20:56 conn3-la61-212-23 chronyd[877]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
Jul 28 12:20:56 conn3-la61-212-23 chronyd[877]: Using right/UTC timezone to obtain leap second data
Jul 28 12:20:58 conn3-la61-212-23 systemd[1]: Started NTP client/server.
Jul 28 12:23:21 conn3-la61-212-23 chronyd[877]: Selected source 10.68.38.66 (ntp.esl.cisco.com)
Jul 28 12:23:21 conn3-la61-212-23 chronyd[877]: System clock wrong by 1611.296985 seconds
Jul 28 12:50:12 conn3-la61-212-23 chronyd[877]: System clock was stepped by 1611.296985 seconds
Jul 28 12:50:12 conn3-la61-212-23 chronyd[877]: System clock TAI offset set to 37 seconds
=========================end===========================
=================chrony sources=================
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* sjc05-73a-dci06n-ntp2.ci>     1  10   377   501    +26us[  +24us] +/-  519us
=====================end========================
=================chrony ntpdata=================

Remote address  : 10.68.38.66 (AB442642)
Remote port     : 123
Local address   : 10.22.212.23 (0A16D417)
Leap status     : Normal
Version         : 4
Mode            : Server
Stratum         : 1
Poll interval   : 10 (1024 seconds)
Precision       : -19 (0.000001907 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 474E5353 (GNSS)
Reference time  : Wed Aug 03 04:54:44 2022
Offset          : -0.000023560 seconds
Peer delay      : 0.001034838 seconds
Peer dispersion : 0.000001973 seconds
Response time   : 0.001528190 seconds
Jitter asymmetry: +0.00
NTP tests       : 111 111 1111
Interleaved     : No
Authenticated   : No
TX timestamping : Kernel
RX timestamping : Kernel
Total TX        : 505
Total RX        : 505
Total valid RX  : 505
=======================end======================

connectorctl ntp restart

To restart the chrony or the Network Time Protocol (NTP) server, use the connectorctl ntp restart command.

connectorctl ntp restart

Syntax Description

This command has no keywords or arguments.

Command History

Release 3

This command is introduced.

Examples

The following is a sample output of the command:
[spacesadmin@connector ~]$ connectorctl ntp restart
Executing command:ntp
Command execution status:Success
-----------------------
Restarted ntp/chronyd service