Module: Cpu::Master

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

Instance Method Summary collapse

Instance Method Details

#cpuObject



8
9
10
# File 'lib/poolparty/monitors/cpu.rb', line 8

def cpu
  nodes.size > 0 ? nodes.inject(0) {|i,a| i+=a.cpu } / nodes.size : 0.0
end