Class: Opstat::Plugins::Xen

Inherits:
Task
  • Object
show all
Defined in:
lib/plugins/xen.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, queue, config) ⇒ Xen

Returns a new instance of Xen.



5
6
7
8
# File 'lib/plugins/xen.rb', line 5

def initialize (name, queue, config)
  super(name, queue, config)
  self
end

Instance Method Details

#parseObject



10
11
12
13
14
15
16
# File 'lib/plugins/xen.rb', line 10

def parse
  report = {}
  xenIO = IO.popen('xentop -i 1 -b -f')
  report  = xenIO.readlines.join
  xenIO.close
  return report
end