cbctl
The ClockBound control utility: inspect the clock status, wait for synchronization, and view time sources.
Overview
cbctl is the ClockBound control command-line utility. It is built with the daemon and installed as /usr/bin/cbctl.
cbctl status
cbctl status shows ClockBound's clock and synchronization information. This includes the current clock status, current time and clock error bound, as well as details about the last clock synchronization event.
cbctl statusExample output
Clock status SYNCHRONIZED
Current time 2026-09-29T17:42:03.094821000Z
Clock error bound (+/-) 67.60 us
Clock error bound growth 15040 ppb
Counter value 3855752014882
Last clock sync 2026-09-29T17:42:00.694821000Z (2s ago)
Clock error bound (+/-) 31.50 us
Counter value 3847592014882
Counter period 0.29411765 ns
Counter period error (+/-) 40 ppb
Counter frequency 3.4000000 GHz
Valid until 2026-09-29T17:58:40.694821000Z (16m 38s left)
Disruption support OnTrue time is within Current time ± Clock error bound. The bound grows at Clock error bound growth, in parts per billion (ppb), until the next clock sync: 1 ppb is 1 ns of bound per second. Counter value is the hardware counter reading the time was computed from: the TSC on x86_64, the architectural counter on aarch64.
Last clock sync is the sync the current time comes from, with its own clock error bound and counter value. Counter period is the measured duration of one counter tick, and its error applies to Counter frequency too. Valid until is when the sync stops being valid.
Clock status
SYNCHRONIZED: the last clock sync was less than 60 seconds ago.FREE_RUNNING: the last clock sync is more than 60 seconds old but still valid.DISRUPTED: the daemon detected a clock disruption and has not synced since.UNKNOWN: the daemon publishedUNKNOWN, or the last clock sync is past Valid until.
Under DISRUPTED and UNKNOWN the current time cannot be trusted, and therefore you will see - printed for Current time, its Clock error bound, and Clock error bound growth.
Under DISRUPTED, the Last clock sync and Valid until also drop their time since and time left values.
See Concepts for what each clock status means for applications.
Disruption support
On: The daemon enabled clock disruption detection through the VMClock device.Off: The daemon did not enable clock disruption detection.
An Off value is expected on EC2 bare metal instances, which have no VMClock device, and outside of EC2, where the daemon does not enable it. On a virtualized EC2 instance, Off means the daemon did not detect that it's running on EC2.
Exit codes
0: the daemon's shared memory segment was read, whatever the clock status.1: there is nothing to show. The message says what was found: no segment, usually because no daemon has run since boot; no clock parameters yet, usually because the daemon has not synced; or another error, with its cause.
cbctl waitsync
cbctl waitsync [--system-clock] [--timeout-seconds SECONDS] [--verbose]Waits for the ClockBound daemon to synchronize the clock. By default it waits indefinitely. This is useful in startup scripts and health checks.
Options:
--system-clock: also wait for the system clock (CLOCK_REALTIME) to be within the tolerance window. The tolerance window is the ClockBound time window, widened equally on both sides if needed so that it is at least 2 milliseconds wide in total.-t,--timeout-seconds SECONDS: the maximum time to wait, in seconds. The default, 0, waits indefinitely.-v,--verbose: print the status of each polling attempt while waiting. The command polls once per second.
Exit codes:
0: the clock is ready.1: the clock did not become ready within the timeout.2: waiting can never succeed, for example on a virtualized EC2 instance where the VMClock device is expected but missing.
cbctl sources
cbctl sources displays the state of all time synchronization sources that are configured within the ClockBound daemon.
cbctl sources [--log-dir DIR]It reads the daemon's sources.log, so the sources log stream must be enabled in the daemon configuration. See Sources Log.
Options:
--log-dir DIR: the directory containing the daemon'ssources.logfile. Defaults to/var/log/clockbound.