Class: SwissAdmin::Host

Inherits:
Object
  • Object
show all
Defined in:
lib/swiss_admin/host/host.rb

Class Method Summary collapse

Class Method Details

.loadavgObject



7
8
9
10
11
12
13
# File 'lib/swiss_admin/host/host.rb', line 7

def self.loadavg
  loadavg = if File.readable?("/proc/loadavg")
              IO.read("/proc/loadavg")
            else
              "unknown"
            end
end

.nameObject



3
4
5
# File 'lib/swiss_admin/host/host.rb', line 3

def self.name
  Socket.gethostname
end