Sources Log
A periodic snapshot of every time synchronization source and its current state.
The sources log provides a periodic snapshot of all configured time synchronization sources and their current state. It is designed for compliance auditing, monitoring the health of redundant sources, and understanding why one source is selected over another.
This log also serves as the backend for the cbctl sources CLI command.
Log location
<log_directory>/sources.log- Format: Newline-delimited JSON (one JSON object per line)
- Configuration: Optional (highly recommended). Enable it with
[logging.sources];<log_directory>islogging.log_directory. - Requirement: Without this log enabled, the
cbctl sourcescommand will be unusable.
Event types
Each line in the log file is a JSON object. The following top level keys are included in every JSON object (examples on this page are pretty-printed; in the file each object is on a single line):
{
"timestamp": "2026-07-16T14:34:00.000000Z",
"event": "sources_snapshot",
"sources_snapshot": {
"sources": [ ... ]
},
"version": "3.0.0"
}| Field | Type | Description |
|---|---|---|
timestamp | string | ISO 8601 UTC timestamp, with microsecond precision, of when the snapshot was taken |
event | string | Always sources_snapshot |
sources_snapshot.sources | array | One item per time synchronization source |
version | string | ClockBound daemon version |
| Event | Frequency | Description |
|---|---|---|
sources_snapshot | Every 60 seconds | An array where each item describes a single time synchronization source |
Event: sources_snapshot
Each item in sources_snapshot.sources has the same keys. Information about a source's identity:
| Field | Type | Presence | Description |
|---|---|---|---|
type | string | Always | Source type: ntp, or phc |
identifier | string | Always | Network address of the NTP server (ip:port) or filepath of the PHC device |
poll_interval_sec | number | Always | How often this source is polled, in seconds |
health | object | Always | Health |
stats | object | Always | Stats |
Health
The source's inferred status and selection history.
| Field | Type | Presence | Description |
|---|---|---|---|
health.selected_at | string | Can be null if source has never been selected | ISO 8601 UTC timestamp of when the time source was selected |
health.deselected_at | string | Can be null if source has never been selected or is currently selected | ISO 8601 UTC timestamp of when the time source was deselected |
health.status | string | Always | The inferred clock synchronization status of the upstream source clock, one of SYNCHRONIZED, FREE_RUNNING, or UNKNOWN |
Status
The inferred clock status of the source is determined from its last response, measured against the clock of the currently selected source:
SYNCHRONIZED- if the source provided a response in the last 60 seconds and the last response was healthy.FREE_RUNNING- if the source provided a response in the last 60 seconds but the last response was unsynchronized.UNKNOWN- if the source has not provided any response in the last 60 seconds, if its last response was unusable for another reason, or if no source is currently selected.
Stats
Aggregate statistics about the source's quality, network distance, and responsiveness.
| Field | Type | Description |
|---|---|---|
stats.requests | integer | Number of requests made to the source since it started |
stats.responses | integer | Number of responses from the source since it started |
stats.latency_ns | stats or null | Statistical summary of sample read latencies over the window. null if there are no samples in the window, or no source is currently selected. |
stats.source_clock_error_bound_ns | stats or null | Statistical summary of sample source clock error bound values over the window. null if there are no samples in the window. |
stats.window_duration_sec | integer | Duration in seconds for the current snapshot's look-back window, up to 600 seconds (10 minutes). |
Stats summary
Summary statistics for a particular value over the window duration, in nanoseconds.
| Field | Type | Description |
|---|---|---|
min | integer | Minimum value. |
median | integer | Median value. |
max | integer | Maximum value. |
Full example
{
"timestamp": "2026-07-16T14:34:00.000000Z",
"event": "sources_snapshot",
"sources_snapshot": {
"sources": [
{
"type": "phc",
"identifier": "/dev/ptp0",
"poll_interval_sec": 0.5,
"health": {
"selected_at": "2026-07-16T12:00:00.000000Z",
"deselected_at": "2026-07-16T13:22:01.000000Z",
"status": "SYNCHRONIZED"
},
"stats": {
"requests": 18240,
"responses": 18240,
"latency_ns": { "min": 2400, "median": 2500, "max": 2600 },
"source_clock_error_bound_ns": { "min": 20000, "median": 21000, "max": 22000 },
"window_duration_sec": 600
}
},
{
"type": "ntp",
"identifier": "169.254.169.123:123",
"poll_interval_sec": 2.0,
"health": {
"selected_at": "2026-07-16T13:22:01.000000Z",
"deselected_at": null,
"status": "SYNCHRONIZED"
},
"stats": {
"requests": 4562,
"responses": 4558,
"latency_ns": { "min": 128400, "median": 141200, "max": 155000 },
"source_clock_error_bound_ns": { "min": 27800, "median": 30100, "max": 31200 },
"window_duration_sec": 600
}
},
{
"type": "ntp",
"identifier": "192.0.2.1:123",
"poll_interval_sec": 16.0,
"health": {
"selected_at": null,
"deselected_at": null,
"status": "UNKNOWN"
},
"stats": {
"requests": 64,
"responses": 0,
"latency_ns": null,
"source_clock_error_bound_ns": null,
"window_duration_sec": 0
}
}
]
},
"version": "3.0.0"
}