Class: Distem::DataCollection::ProbeLoadAvg
- Inherits:
-
Probe
- Object
- Probe
- Distem::DataCollection::ProbeLoadAvg
- Defined in:
- lib/distem/datacollection/probe_loadavg.rb
Instance Attribute Summary
Attributes inherited from Probe
Instance Method Summary (collapse)
- - (Object) get_value
-
- (ProbeLoadAvg) initialize(drift, data, opts = nil)
constructor
A new instance of ProbeLoadAvg.
Methods inherited from Probe
Constructor Details
- (ProbeLoadAvg) initialize(drift, data, opts = nil)
Returns a new instance of ProbeLoadAvg
6 7 8 |
# File 'lib/distem/datacollection/probe_loadavg.rb', line 6 def initialize(drift, data, opts = nil) super(drift, data, opts) end |
Instance Method Details
- (Object) get_value
10 11 12 13 |
# File 'lib/distem/datacollection/probe_loadavg.rb', line 10 def get_value output = `cat /proc/loadavg`.split(' ') return [output[0].to_f, output[1].to_f, output[2].to_f] end |