Use two digit precision for uptime, thanks to D.Marck
HEADmaster1 files changed, 2 insertions, 1 deletions
|
diff --git a/minimunin b/minimunin index 70d8b69..4332722 100755 --- a/ minimunin+++ b/ minimunin |
@@ -70,7 +70,8 @@ swap) |
70 | ;; |
70 | ;; |
71 | uptime) |
71 | uptime) |
72 | boot=$(get_sys kern.boottime); boot=${boot#*sec =}; boot=${boot%%,*} |
72 | boot=$(get_sys kern.boottime); boot=${boot#*sec =}; boot=${boot%%,*} |
73 | printf "uptime.value %d\n" $(( ( `/bin/date +%s` - boot ) / 86400 )) |
73 | uptime=$(( ( `/bin/date +%s` - boot ) / 864 )) |
| |
74 | printf "uptime.value %.$((${#uptime} - 2))s.%d\n" ${uptime} ${uptime#${uptime%??}} |
74 | ;; |
75 | ;; |
75 | memory) |
76 | memory) |
76 | pagesize=$(get_sys vm.stats.vm.v_page_size) |
77 | pagesize=$(get_sys vm.stats.vm.v_page_size) |
|