Class: AOSW
- Inherits:
-
Oxidized::Model
- Object
- Oxidized::Model
- AOSW
- Defined in:
- lib/oxidized/model/aosw.rb
Instance Attribute Summary
Attributes inherited from Oxidized::Model
Instance Method Summary collapse
Methods inherited from Oxidized::Model
cfg, #cfg, cfgs, #cmd, cmd, cmds, comment, #comment, expect, #expect, expects, #expects, #get, inherited, #output, post, pre, procs, prompt, #prompt, #send
Methods included from Oxidized::Config::Vars
Instance Method Details
#clean(cfg) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oxidized/model/aosw.rb', line 43 def clean cfg out = [] cfg.each_line do |line| # drop the temperature, fan speed and voltage, which change each run next if line.match /Output \d Config/i next if line.match /(Tachometers|Temperatures|Voltages)/ next if line.match /((Card|CPU) Temperature|Chassis Fan|VMON1[0-9])/ next if line.match /[0-9]+ (RPM|mV|C)$/ out << line.strip end out = out.join "\n" out << "\n" end |