Class: WarCorrespondent::Reporters::LoadAvg
- Inherits:
-
WarCorrespondent::Reporter
- Object
- WarCorrespondent::Reporter
- WarCorrespondent::Reporters::LoadAvg
- Defined in:
- lib/warcorrespondent/reporters/loadavg.rb
Instance Attribute Summary
Attributes inherited from WarCorrespondent::Reporter
#identifier, #options, #timeout
Instance Method Summary collapse
-
#initialize(args) ⇒ LoadAvg
constructor
A new instance of LoadAvg.
Methods inherited from WarCorrespondent::Reporter
Constructor Details
#initialize(args) ⇒ LoadAvg
Returns a new instance of LoadAvg.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/warcorrespondent/reporters/loadavg.rb', line 4 def initialize(args) @block = Proc.new do load = SystemInformation::load [ {:identifier => "load:1", :value => load[:load_1]}, {:identifier => "load:5", :value => load[:load_5]}, {:identifier => "load:15", :value => load[:load_15]}, {:identifier => "processes:running", :value => load[:procs_running]}, {:identifier => "processes:total", :value => load[:procs_total]} ] end super(args) end |