Skip to main content

cpufreq-governor

Overview

Verifies that all CPU cores use the same frequency governor and that it matches the expected setting.

Command-Line Options

OptionTypeDefaultDescription
--governorStringperformanceRequired CPU frequency governor
--sys_freq_fileString/sys/devices/system/cpu/cpu*/cpufreq/scaling_governorFile glob pattern to read governor
--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)All CPUs use expected governor
WARN (1)Command execution failed
CRITICAL (2)Governor mismatch

Usage Examples

cpufreq-governor - Performance Governor Check

health_checks check-processor cpufreq-governor \
--sink stdout \
[CLUSTER] \
app

cpufreq-governor - Powersave Governor Check

health_checks check-processor cpufreq-governor \
--governor powersave \
--sink stdout \
[CLUSTER] \
app

cpufreq-governor - Custom Sysfs Path

health_checks check-processor cpufreq-governor \
--governor ondemand \
--sys_freq_file /sys/devices/system/cpu/cpu[0-7]/cpufreq/scaling_governor \
--sink stdout \
[CLUSTER] \
app

cpufreq-governor - Debug Mode

health_checks check-processor cpufreq-governor \
--governor performance \
--log-level DEBUG \
--verbose-out \
--sink otel \
--sink-opts "log_resource_attributes={'attr_1': 'value1'}" \
[CLUSTER] \
app