Class: SwissAdmin::Host
- Inherits:
-
Object
- Object
- SwissAdmin::Host
- Defined in:
- lib/swiss_admin/host/host.rb
Class Method Summary collapse
Class Method Details
.loadavg ⇒ Object
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 |
.name ⇒ Object
3 4 5 |
# File 'lib/swiss_admin/host/host.rb', line 3 def self.name Socket.gethostname end |