config time

Prev Next

Commands for configuring how the host system synchronizes its clock via Network Time Protocol (NTP) or Precision Time Protocol Version 2 (PTPv2).


show time source

Displays information about how the host synchronizes its time via NTP or PTPv2.

show time source

Example output:

[Sat Jan 11 06:34:43 2025] > show time source
[Sat Jan 11 06:34:46 2025]
Time sync. source: NTP
NTP
  - Server 0    : 192.168.19.79
  - Server 1    : 192.168.19.80
  - Server 2    :
  - Server 3    :
  - Fudge       : false
PTPv2
  - Master 0    : 192.168.19.81
  - Master 1    :
  - Master 2    :
  - Master 3    :
  - Update rate :
  - VLAN ID     : 0
  - Interface   : man10

show timezone

Prints the system clock’s current timezone.

show timezone

Example output:

[Fri Jan 24 04:12:34 2025] > show timezone
[Fri Jan 24 04:12:34 2025] Timezone:
[Fri Jan 24 04:12:34 2025]     UTC +00:00 (UTC)

config timezone

Sets the system’s time zone. The argument to this command must be a timezone data file located under the /usr/share/zoneinfo directory (and its subdirectories).

Note: this command will not take effect until after a reboot.

config timezone <city name>

Example output:

[Thu Mar  6 01:42:01 2025] setting timezone to [/usr/share/zoneinfo/Greenwich]
[Thu Mar  6 01:42:01 2025]     UTC +00:00 M (GMT)
[Thu Mar  6 01:42:01 2025] *** System requires a reboot to take effect ****

config time source

Sets whether to use NTP or PTPv2 for host time synchronization.

config time source <ntp|ptpv2>

Example output:

[Wed Dec 18 05:56:09 2024] > config time source ntp
[Wed Dec 18 05:56:10 2024] Time source changed successfully.

config time ntp

Sets the IP address for one of the NTP servers the host will use to synchronize its clock.

config time ntp <server0|server1|server2|server3> <IP address>

Example output:

[Wed Dec 18 06:01:52 2024] > config time ntp server0 192.168.19.79
[Wed Dec 18 06:01:53 2024] NTP server 0 changed successfully.

Note:

  • Use config time ntp <server0|server1|server2|server3> "" to unset an address. Be aware that single quotation marks cannot be used in place of double quotation marks.


config time ntpfudge

Sets whether or not the host will accept synchronization with stratum 16 NTP sources (i.e. sources which are themselves not synchronized).

config time ntpfudge <true|false>

Example output:

[Wed Dec 18 06:19:33 2024] > config time ntpfudge true
[Wed Dec 18 06:19:34 2024] NTP "fudging" enabled successfully
[Wed Dec 18 06:19:37 2024] > config time ntpfudge false
[Wed Dec 18 06:19:37 2024] NTP "fudging" disabled successfully