Browse Source

muninlite: uptime should report days, not seconds.

upstream bug: https://sourceforge.net/p/muninlite/patches/8/

Closes #810

Signed-off-by: Craig Gallek <cgallek@gmail.com>
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Craig Gallek 10 years ago
parent
commit
1295d8723f
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      admin/muninlite/patches/110-fix-uptime-days.patch

+ 9
- 0
admin/muninlite/patches/110-fix-uptime-days.patch View File

@@ -0,0 +1,9 @@
1
+--- a/plugins/uptime
2
++++ b/plugins/uptime
3
+@@ -7,5 +7,5 @@
4
+   echo "uptime.cdef uptime,86400,/"
5
+ }
6
+ fetch_uptime() {
7
+-  echo "uptime.value" $(cut -d\  -f1 /proc/uptime)
8
++  awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime
9
+ }