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