Class: Opstat::Plugins::Load
- Inherits:
-
Task
- Object
- Task
- Opstat::Plugins::Load
- Defined in:
- lib/plugins/load.rb
Constant Summary collapse
- STAT_FILE =
"/proc/loadavg"
Instance Method Summary collapse
-
#initialize(name, queue, config) ⇒ Load
constructor
A new instance of Load.
- #parse ⇒ Object
Constructor Details
#initialize(name, queue, config) ⇒ Load
Returns a new instance of Load.
6 7 8 9 |
# File 'lib/plugins/load.rb', line 6 def initialize (name, queue, config) super(name, queue, config) self end |
Instance Method Details
#parse ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/plugins/load.rb', line 11 def parse @count_number += 1 #TODO do i have to do it in array way? report = Array.new report << File.foreach(STAT_FILE).first return report end |