Rubyipmi::Freeipmi::Sensors

Public Class Methods

new(opts = ObservableHash.new) click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 5
def initialize(opts = ObservableHash.new)
  super("ipmi-sensors", opts)
  @options["no-header-output"] = false
  @options["output-sensor-state"] = false
end

Public Instance Methods

count() click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 20
def count
  sensors.count
end
fanlist(refreshdata=false) click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 28
def fanlist(refreshdata=false)
  refresh if refreshdata
  flist = []
  values = sensors.each do |sensor|
    match = sensor.first.match(/(fan)_(\d+)/)
    next if match.nil?
    if match[1] == "fan"
      num = (match[2].to_i) -1
      flist[num] = sensor.last[:value]
    end
  end
  flist
end
list() click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 16
def list
  sensors
end
names() click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 24
def names
  sensors.keys
end
refresh() click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 11
def refresh
  @sensors = nil
  sensors
end
templist(refreshdata=false) click to toggle source
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 42
def templist(refreshdata=false)
  refresh if refreshdata
  tlist = []
  values = sensors.each do |sensor|
    match = sensor.first.match(/(temp)_(\d+)/)
    next if match.nil?
    if match[1] == "temp"
      num = (match[2].to_i) -1
      tlist[num] = sensor.last[:value]
    end
  end
  tlist
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.