Module: check_mk
Branch: master
Commit: 9cfb9f621f8365fd66e8bfda0393892fc4ab21ea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9cfb9f621f8365…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Apr 20 10:11:41 2017 +0200
4623 FIX check_mk_agent.solaris: Fixed computation of uptime
Change-Id: I4058776233379921f0162e3351f49de4ca180b68
---
.werks/4623 | 10 ++++++++++
agents/check_mk_agent.solaris | 5 ++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.werks/4623 b/.werks/4623
new file mode 100644
index 0000000..40793ef
--- /dev/null
+++ b/.werks/4623
@@ -0,0 +1,10 @@
+Title: check_mk_agent.solaris: Fixed computation of uptime
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1492675840
+Class: fix
+
+
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index adacbaf..c10e3b1 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -297,9 +297,8 @@ fi
# /proc/uptime
# Simulated output of Linux /proc/uptime
echo '<<<uptime>>>'
-ctime=`nawk 'BEGIN{print srand()}'`;
-btime=`kstat '-p' 'unix:::boot_time' 2>&1|grep
'boot_time'|awk '{print $2}'`;
-echo $(($ctime - $btime));
+btime=$(`kstat '-p' 'unix:::boot_time' 2>&1|grep
'boot_time'|awk '{print $2}'`;)
+echo $btime
# NTP