Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve uptime status sed script to report correct units for a few uptime scenarios #437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xafarr
Copy link
Contributor

@xafarr xafarr commented Nov 20, 2024

10:31 up 36 mins, 2 users, load averages: 2.55 4.87 6.81
Screenshot 2024-11-20 at 2 29 15 pm

9:42 up 10 days, 25 mins, 2 users, load averages: 4.71 4.27 4.00
Screenshot 2024-10-21 at 9 55 39 am

18:43 up 21 days, 9 hrs, 2 users, load averages: 3.99 6.48 10.99
Screenshot 2024-10-24 at 9 25 26 AM

The following are examples of current and fixed sed scripts.

Uptime String: 18:43  up 9 hrs, 2 users, load averages: 3.99 6.48 10.99
Current SED: 9 hrsm
Fixed SED: 9h

Uptime String: 18:44  up  9:01, 2 users, load averages: 4.94 6.21 10.55
Current SED: 9h 01m
Fixed SED: 9h 01m

Uptime String: 9:31  up 45 secs, 2 users, load averages: 105.51 24.01 8.61
Current SED: 45 secsm
Fixed SED: 45s

Uptime String: 9:32  up 2 mins, 2 users, load averages: 109.13 55.55 22.93
Current SED: 2sm
Fixed SED: 2m

Uptime String: 22:37:29 up 4 days,  9:44,  1 user,  load average: 0.07, 0.03, 0.01
Current SED: 4d 9h 44m
Fixed SED: 4d 9h 44m

Uptime String: 11:24  up  1:54, 2 users, load averages: 5.25 11.69 13.95
Current SED: 1h 54m
Fixed SED: 1h 54m

Uptime String: 9:30  up 3 days, 0 sec, 2 users, load averages: 3.83 4.47 4.04
Current SED: 3d 0 secm
Fixed SED: 3d 0s

Uptime String: 9:42  up 3 days, 12 mins, 2 users, load averages: 4.71 4.27 4.00
Current SED: 3d 12sm
Fixed SED: 3d 12m

Uptime String: 9:56  up 10 days, 26 mins, 2 users, load averages: 2.26 2.28 2.49
Current SED: 10d 26sm
Fixed SED: 10d 26m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant