Module: LinuxUtilinfo::GeneralMethods
- Defined in:
- lib/linux_utilinfo/general_methods.rb
Instance Method Summary collapse
Instance Method Details
#get_timezone ⇒ Object
8 9 10 11 |
# File 'lib/linux_utilinfo/general_methods.rb', line 8 def get_timezone timezone = `timedatectl | grep -i 'Time zone' | cut -d ':' -f2` return timezone end |
#get_uptime ⇒ Object
3 4 5 6 |
# File 'lib/linux_utilinfo/general_methods.rb', line 3 def get_uptime uptime = `uptime | tr "," " " | cut -d " " -f5-6` return uptime end |