Prevent format string error for uptimes < 900. Thanks to Michael Proto.
HEADmaster1 files changed, 1 insertions, 1 deletions
|
diff --git a/minimunin b/minimunin index 809cac1..c9c4f4f 100755 --- a/ minimunin+++ b/ minimunin |
@@ -77,7 +77,7 @@ swap) |
77 | uptime) |
77 | uptime) |
78 | boot=$(get_sys kern.boottime); boot=${boot#*sec =}; boot=${boot%%,*} |
78 | boot=$(get_sys kern.boottime); boot=${boot#*sec =}; boot=${boot%%,*} |
79 | uptime=$(( ( `/bin/date +%s` - boot ) / 864 )) |
79 | uptime=$(( ( `/bin/date +%s` - boot ) / 864 )) |
80 | printf "uptime.value %.$((${#uptime} - 2))s.%d\n" ${uptime} ${uptime#${uptime%??}} |
80 | printf "uptime.value %d.%02d\n" $((uptime/100)) $((uptime%100)) |
81 | ;; |
81 | ;; |
82 | memory) |
82 | memory) |
83 | pagesize=$(get_sys vm.stats.vm.v_page_size) |
83 | pagesize=$(get_sys vm.stats.vm.v_page_size) |
|