Skip to main content

check-clocksource

Overview

Validates that the system uses the expected clock source for timekeeping. The clock source affects time synchronization accuracy which is critical for distributed systems and scheduling.

Command-Line Options

OptionTypeDefaultDescription
--expected-sourceStringRequiredExpected clocksource (e.g., tsc, hpet)
--sys-clocksource-fileString/sys/devices/system/clocksource/clocksource0/current_clocksourcePath to clocksource file
--timeoutInteger300Command execution timeout in seconds
--sinkStringdo_nothingTelemetry sink destination
--sink-optsMultiple-Sink-specific configuration
--verbose-outFlagFalseDisplay detailed output
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--heterogeneous-cluster-v1FlagFalseEnable heterogeneous cluster support

Exit Conditions

Exit CodeCondition
OK (0)Feature flag disabled (killswitch active)
OK (0)Clocksource matches expected
WARN (1)Command execution failed
CRITICAL (2)Clocksource mismatch

Usage Examples

check-clocksource - TSC Clocksource Check

health_checks check-processor check-clocksource \
--expected-source tsc \
--sink stdout \
[CLUSTER] \
app

check-clocksource - HPET Clocksource Check

health_checks check-processor check-clocksource \
--expected-source hpet \
--sink stdout \
[CLUSTER] \
app

check-clocksource - Custom Clocksource Path

health_checks check-processor check-clocksource \
--expected-source tsc \
--sys-clocksource-file /sys/custom/clocksource \
--sink otel \
--sink-opts "log_resource_attributes={'attr_1': 'value1'}" \
[CLUSTER] \
app

check-clocksource - Debug Mode

health_checks check-processor check-clocksource \
--expected-source tsc \
--log-level DEBUG \
--verbose-out \
--sink stdout \
[CLUSTER] \
app