diff options
author | richard mcleod <rmcleod8@bloomberg.net> | 2017-09-01 14:41:08 -0400 |
---|---|---|
committer | richard mcleod <rmcleod8@bloomberg.net> | 2017-09-01 14:41:08 -0400 |
commit | ddc09206c30bc9b655db6bfa764379ed41f1d4fc (patch) | |
tree | 63a569fb21dbc5d725efef54bb1b3fa8c5fab930 | |
parent | a21e33bb434c99ba988455493022dca7ec447619 (diff) | |
download | ohai-ddc09206c30bc9b655db6bfa764379ed41f1d4fc.tar.gz |
fixing some whitespace issues
Signed-off-by: richard mcleod <rmcleod8@bloomberg.net>
-rw-r--r-- | lib/ohai/plugins/aix/uptime.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ohai/plugins/aix/uptime.rb b/lib/ohai/plugins/aix/uptime.rb index 1a1648a3..d6b7ac1e 100644 --- a/lib/ohai/plugins/aix/uptime.rb +++ b/lib/ohai/plugins/aix/uptime.rb @@ -28,7 +28,7 @@ Ohai.plugin(:Uptime) do # This reads as 1148 days, 20 hours, 54 minutes, 50 seconds since the process was started (elapsed) # who -b does not return the YEAR, so we need something more concrete so = shell_out("LC_ALL=POSIX ps -o etime= -p 1").stdout - + # Here we'll check our shell_out for a dash, which indicates there is a # of days involved # We'll chunk off the days, hours (where applicable), minutes, seconds into seperate vars # We also need to do this because ps -o etime= will not display days if the machine has been up for less than 24 hours @@ -45,9 +45,8 @@ Ohai.plugin(:Uptime) do (m, s) = so.split(/[:]/) end elapsed_seconds = ((d.to_i * 86400) + (h.to_i * 3600) + (m.to_i * 60) + s.to_i) - - uptime_seconds Time.now.to_i - elapsed_seconds + + uptime_seconds Time.now.to_i - elapsed_seconds uptime seconds_to_human(elapsed_seconds) - end end |