diff --git a/sysfs/system_cpu.go b/sysfs/system_cpu.go index b369568a0..a8d0ac2d1 100644 --- a/sysfs/system_cpu.go +++ b/sysfs/system_cpu.go @@ -181,6 +181,10 @@ func (fs FS) SystemCpufreq() ([]SystemCPUCpufreqStats, error) { return nil, err } + if len(systemCpufreq) == 0 { + return nil, fmt.Errorf("could not find any cpufreq files: %w", os.ErrNotExist) + } + return systemCpufreq, nil }