uptime should report days, not seconds

Source: https://sourceforge.net/p/muninlite/patches/8/
Author: Craig Gallek

See patch "110-fix-uptime-days" in OpenWrt.
This commit is contained in:
Lars Kruse 2019-07-19 05:54:53 +02:00
parent 3e0ecfe678
commit 44628e78cc
1 changed files with 1 additions and 2 deletions

View File

@ -4,8 +4,7 @@ config_uptime() {
echo "graph_vlabel uptime in days"
echo "uptime.label uptime"
echo "uptime.draw AREA"
echo "uptime.cdef uptime,86400,/"
}
fetch_uptime() {
echo "uptime.value" $(cut -d\ -f1 /proc/uptime)
awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime
}