packages/admin/muninlite/patches/110-fix-uptime-days.patch
Jonathan McCrohan 8c6a2df87a muninlite: fix uptime should report days patch
1295d87 failed to remove cdef config which will break graphs for
existing users.

Properly closes #810

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
2015-02-12 00:24:13 +00:00

12 lines
354 B
Diff

--- 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
}