Sha256: b084741ea7b56db735bb2d2a4ddd39b395b45c037baea4575afaa5968916c13f

Contents?: true

Size: 243 Bytes

Versions: 8

Compression:

Stored size: 243 Bytes

Contents

module PoolParty
  module Monitors
    
    class CpuMonitor < BaseMonitor
      
      def run
        stdout = %x[uptime]
        stdout.split(/\s+/)[-1].to_f rescue 0.0
      end
            
    end
    
    register_monitor :cpu
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
auser-poolparty-0.2.88 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.89 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.90 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.91 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.92 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.93 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.94 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-1.0.0 lib/poolparty/monitors/monitors/cpu_monitor.rb