Module | Facter::Util::Uptime |
In: |
lib/facter/util/uptime.rb
|
A module to gather uptime facts
# File lib/facter/util/uptime.rb, line 16 16: def self.get_uptime 17: uptime, idletime = File.open("/proc/uptime").gets.split(" ") 18: uptime_seconds = uptime.to_i 19: end
# File lib/facter/util/uptime.rb, line 21 21: def self.get_uptime_period(seconds, label) 22: 23: case label 24: when 'days' 25: value = seconds / 86400 26: when 'hours' 27: value = seconds / 3600 28: when 'seconds' 29: seconds 30: end 31: 32: end