Module: Cpu::Remote

Defined in:
lib/poolparty/monitors/cpu.rb

Instance Method Summary collapse

Instance Method Details

#cpuObject



14
15
16
17
18
# File 'lib/poolparty/monitors/cpu.rb', line 14

def cpu      
  str = run("uptime").split(/\s+/)[-3].to_f rescue 0.0
  PoolParty.message "Cpu usage: #{str}"
  str
end