Class/Module Index [+]

Quicksearch

Facter::Util::Uptime

A module to gather uptime facts

Public Class Methods

get_uptime_seconds_unix() click to toggle source
# File lib/facter/util/uptime.rb, line 6
def self.get_uptime_seconds_unix
  uptime_proc_uptime or uptime_sysctl or uptime_executable
end
get_uptime_seconds_win() click to toggle source
# File lib/facter/util/uptime.rb, line 10
def self.get_uptime_seconds_win
  require 'facter/util/wmi'

  last_boot = ""
  Facter::Util::WMI.execquery("select * from Win32_OperatingSystem").each do |x|
    last_boot = x.LastBootupTime
  end
  self.compute_uptime(Time.parse(last_boot.split('.').first))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.