From 4133b3f3488b0b2df8ea6e63d2dd871dc4a977ce Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 21 Sep 2024 01:11:56 +0200 Subject: Use two digit precision for uptime, thanks to D.Marck --- minimunin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/minimunin b/minimunin index 70d8b69..4332722 100755 --- a/minimunin +++ b/minimunin @@ -70,7 +70,8 @@ swap) ;; uptime) boot=$(get_sys kern.boottime); boot=${boot#*sec =}; boot=${boot%%,*} - printf "uptime.value %d\n" $(( ( `/bin/date +%s` - boot ) / 86400 )) + uptime=$(( ( `/bin/date +%s` - boot ) / 864 )) + printf "uptime.value %.$((${#uptime} - 2))s.%d\n" ${uptime} ${uptime#${uptime%??}} ;; memory) pagesize=$(get_sys vm.stats.vm.v_page_size) -- cgit v1.2.3