Method: CloudFlock::App::Watchdogs#system_load
- Defined in:
- lib/cloudflock/app/common/watchdogs.rb
#system_load(ssh, name) ⇒ Object
Public: Create a Watchdog which monitors the system load average on a given host.
ssh - SSH session which the Watchdog should monitor. name - String describing the Watchdog.
Returns a Watchdog.
32 33 34 35 36 |
# File 'lib/cloudflock/app/common/watchdogs.rb', line 32 def system_load(ssh, name) CloudFlock::Remote::SSH::Watchdog.new(name, ssh, 'uptime', 15) do |uptime| uptime.split(/\s+/)[-3].to_f end end |