Method: Host::Linux::LoadAverage#on_last

Defined in:
lib/host/linux/load_average.rb

#on_last(minutes) ⇒ Object

Returns the load average in the last minutes. If the parameter passed is neither 1, 5 or 15, then the value returned is the load average on the nearest time.

For instance, Host::LoadAverage.on_last(4) will return the same as Host::LoadAverage.on_last(5).



20
21
22
# File 'lib/host/linux/load_average.rb', line 20

def on_last(minutes)
  @info[nearest(minutes)]
end