summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-09-21 01:11:56 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-09-21 01:11:56 +0200
commit4133b3f3488b0b2df8ea6e63d2dd871dc4a977ce (patch)
tree4e091c6e33e7650ddcf5a4d13e911a8d0b0a936b
parent7790d80daf888a6882115608ce5e5eec6b305e26 (diff)
Use two digit precision for uptime, thanks to D.MarckHEADmaster
-rwxr-xr-xminimunin3
1 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 ;;
71uptime) 71uptime)
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 ;;
75memory) 76memory)
76 pagesize=$(get_sys vm.stats.vm.v_page_size) 77 pagesize=$(get_sys vm.stats.vm.v_page_size)