Class | Sys::Uptime |
In: |
lib/linux/sys/uptime.rb
lib/windows/sys/uptime.rb ext/sys/uptime.c |
Parent: | Object |
Returns the boot time as a Time object.
Example:
Sys::Uptime.boot_time # => Fri Dec 12 20:18:58 -0700 2008
Returns the total number of days the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.days # => 1
Returns the total number of hours the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.hours # => 33
Returns the total number of minutes the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.minutes # => 1980
Returns the total number of seconds the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.seconds # => 118800