This is the development version of Kanrisuru. Since this is still a pre-1.0 release, we don't recommend using this in system-critical production environments.

Kanrisuru

load_average

Get the load average of a set of cpus on a remote system in ruby.

Basic Usage

require 'kanrisuru'
host = Kanrisuru::Remote::Host.new(host: '127.0.1.1', username: 'ubuntu', keys: ['~/.ssh/id_rsa'])

result = host.load_average
result.success?
true

result.to_a
[0.06, 0.01, 0.0]

Result

Returns an array of 3 float values. The first value is the load average over the last 1 minute. The second value is the load average over the last 5 minutes. The third value is the load average over the last 15 minutes.

Exit Status

Code Description
0 Success
1 Failure

Tested On

  • Ubuntu, Debian, Centos, Fedora, Redhat, OpenSuse, SLES