summaryrefslogtreecommitdiffstats
path: root/admin/muninlite/patches/110-fix-uptime-days.patch
blob: d9aa43f4a549fd389a9b8003700cb593e44451ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/plugins/uptime
+++ b/plugins/uptime
@@ -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
 }