Sha256: ac4c6daf74f9317fd9072c88f49045d2647615515258f1bb12e17c52d09bb4a0
Contents?: true
Size: 569 Bytes
Versions: 77
Compression:
Stored size: 569 Bytes
Contents
# Fact: uptime_seconds # # Purpose: Return purely number of seconds of uptime. # # Resolution: # Using the 'facter/util/uptime.rb' module, try a verity of methods to acquire # the uptime on Unix. # # On Windows, the module calculates the uptime by the "LastBootupTime" Windows # management value. # # Caveats: # require 'facter/util/uptime' Facter.add(:uptime_seconds) do setcode { Facter::Util::Uptime.get_uptime_seconds_unix } end Facter.add(:uptime_seconds) do confine :kernel => :windows setcode { Facter::Util::Uptime.get_uptime_seconds_win } end
Version data entries
77 entries across 77 versions & 3 rubygems