Sha256: 004a4271382c9195e10e130c30b49dc6fac23a26914e28d9d9c7120e83cd5e65

Contents?: true

Size: 534 Bytes

Versions: 99

Compression:

Stored size: 534 Bytes

Contents

# Fact: uptime_seconds
#
# Purpose: Return just the number of seconds of uptime.
#
# Resolution:
#   Acquires the uptime in seconds via the 'seconds' key of the system_uptime fact,
#   which uses the `facter/util/uptime.rb` module to try a variety 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.value(:system_uptime)['seconds'] }
end

Version data entries

99 entries across 99 versions & 2 rubygems

Version Path
bolt-0.21.7 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.6 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.5 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.4 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.3 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.2 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.1 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.21.0 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.20.7 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.20.6 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.20.5 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.20.3 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.20.2 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.19.1 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.19.0 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.18.2 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.18.1 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.18.0 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.17.2 vendored/facter/lib/facter/uptime_seconds.rb
bolt-0.17.1 vendored/facter/lib/facter/uptime_seconds.rb