# 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 @options["entity-sensor-names"] = false end
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 21 def count list.count end
returns a hash of fan sensors where the key is fan name and value is the sensor
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 30 def fanlist(refreshdata=false) refresh if refreshdata flist = {} list.each do | name,sensor | if name =~ /.*fan.*/ flist[name] = sensor end end return flist end
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 53 def getsensors value = runcmd return @result end
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 17 def list @sensors ||= parse(getsensors) end
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 25 def names list.keys end
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 12 def refresh @sensors = nil list end
returns a hash of sensors where each key is the name of the sensor and the value is the sensor
# File lib/rubyipmi/freeipmi/commands/sensors.rb, line 42 def templist(refreshdata=false) refresh if refreshdata tlist = {} list.each do | name , sensor | if sensor[:unit] =~ /.*degree.*/ || name =~ /.*temp.*/ tlist[name] = sensor end end return tlist end
Generated with the Darkfish Rdoc Generator 2.