Skip to content

Commit

Permalink
adds check for already seen CPUs
Browse files Browse the repository at this point in the history
fixes issue #150
  • Loading branch information
gurubert committed Feb 15, 2024
1 parent a8700de commit eb11ea7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file removed cpufreq/cpufreq-2.3.1.mkp
Binary file not shown.
Binary file added cpufreq/cpufreq-2.4.0.mkp
Binary file not shown.
5 changes: 4 additions & 1 deletion cpufreq/lib/check_mk/base/plugins/agent_based/cpufreq.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ def check_cpufreq(section) -> CheckResult:
freqs = []
perfdata = []
errors = []
cpus_seen = set()
for line in section:
res = State.OK
cpu = line[0]
if cpu in cpus_seen:
continue
cpus_seen.add(cpu)
governor = line[1]
cur_freq = int(line[2]) * 1000.0
if line[3] != 'unknown':
Expand Down

0 comments on commit eb11ea7

Please sign in to comment.