Build precise queries to find exactly what you need
Press ESC to close
Works as expected when uptime is higher than a day.
When it is not, the output looks like this: “System Uptime – up 11 Hours, 16, 2 users Minutes”
I just put the line 7 inside an if that checks if there is an instance of “day” in the variable and formats accordingly:
if [[ $struptime == *day* ]]; then struptime1=${struptime%,} else struptime1=${struptime%, *} fi
I hope it helps =)
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!