Skip to content

Commit

Permalink
[windows] fix core cpu check; didn't specify counter instance name (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwbrown authored Jan 14, 2019
1 parent 4b3552c commit bf2e3ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checks/system/win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, logger):
self.counter('system.cpu.system')
self.counter('system.cpu.interrupt')

self.cpu_interrupt_counter = WinPDHCounter('Processor', '% Interrupt Time', logger)
self.cpu_interrupt_counter = WinPDHCounter('Processor', '% Interrupt Time', logger, instance_name="_Total")

def check(self, agentConfig):
cpu_percent = psutil.cpu_times()
Expand All @@ -154,7 +154,7 @@ def check(self, agentConfig):
self.save_sample('system.cpu.system', 100 * cpu_percent.system / psutil.cpu_count())

interrupt = self.cpu_interrupt_counter.get_single_value()
self.save_sample('system.cpu.interrupt', interrupt)
self.save_sample('system.cpu.interrupt', 100 * interrupt)

return self.get_metrics()

Expand Down

0 comments on commit bf2e3ac

Please sign in to comment.