Sha256: 8491caf5445235a460c0caaf71320c25c0e6e7349995b1cd61f787c42883b05d

Contents?: true

Size: 237 Bytes

Versions: 12

Compression:

Stored size: 237 Bytes

Contents

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

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
auser-poolparty-0.2.20 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.21 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.22 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.23 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.24 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.25 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.26 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.35 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.36 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.37 lib/poolparty/monitors/monitors/cpu_monitor.rb
auser-poolparty-0.2.38 lib/poolparty/monitors/monitors/cpu_monitor.rb
poolparty-0.2.18 lib/poolparty/monitors/monitors/cpu_monitor.rb