Method: ConfCtl::MachineControl#uptime
- Defined in:
- lib/confctl/machine_control.rb
#uptime ⇒ Integer
Returns uptime in seconds.
88 89 90 |
# File 'lib/confctl/machine_control.rb', line 88 def uptime read_file('/proc/uptime').strip.split[0].to_f end |