A simple ruby gem for accessing power information from an APC UPS device
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
spec
README.markdown
Rakefile
apc4r-0.1.gem
apc4r.gemspec

README.markdown

#apc4r - A simple library for accessing power information from an APC UPS device

##Installation

gem install apc4r -s http://gemcutter.org

Examples

#create a new status class with a cache ttl of 60 seconds status = Apc4r::Status.new 60

#print the load percentage
puts status.loadpct

#print the estimated load in watts
puts status.estimated_load

#print all available fields of the APC device
status.status.each_pair do |field, value|
  puts "#{field} -> #{value}"
end

##Requirements

  • An APC UPS Battery backup device connected to a ruby-enabled host
  • apcupsd installed and running

##Dependencies

  • Just apcupsd