Class: Probe::CpuUsage

Inherits:
Probe
  • Object
show all
Defined in:
lib/pimon/probe/cpu_usage.rb

Class Method Summary collapse

Methods inherited from Probe

unit

Class Method Details

.checkObject



4
5
6
# File 'lib/pimon/probe/cpu_usage.rb', line 4

def self.check
  100 - `vmstat 1 2`.split(/\n/)[3].split(" ")[14].to_i
end

.symbolObject



8
9
10
# File 'lib/pimon/probe/cpu_usage.rb', line 8

def self.symbol
  :cpu
end