Module: check_mk
Branch: master
Commit: a6c6b7e30dc8ba3e0560a784df1a46bb80952fa9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a6c6b7e30dc8ba…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 6 16:38:09 2015 +0100
#2754 FIX ipmitool: Killing asynchronous ipmitool call after 300 seconds
The ipmitool command can take a long time to return on some systems.
But the agent needs to ensure that not too many ipmitool processes
are open at the same time.
---
.werks/2754 | 12 ++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2754 b/.werks/2754
new file mode 100644
index 0000000..108e0c9
--- /dev/null
+++ b/.werks/2754
@@ -0,0 +1,12 @@
+Title: ipmitool: Killing asynchronous ipmitool call after 300 seconds
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1446824182
+
+The ipmitool command can take a long time to return on some systems.
+But the agent needs to ensure that not too many ipmitool processes
+are open at the same time.
diff --git a/ChangeLog b/ChangeLog
index 1c670ff..83b7a8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
* 2731 FIX: smart.temp: Handles case of missing temperature values correctly
* 2753 FIX: ad_replication: Made check more robust agains garbled agent output
* 2773 FIX: omd_staomd_status: handle case where site's software installation is
broken
+ * 2754 FIX: ipmitool: Killing asynchronous ipmitool call after 300 seconds...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 84071c8..05d2cb3 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -306,7 +306,7 @@ cat /proc/vmstat /proc/stat
# Hardware sensors via IPMI (need ipmitool)
if type ipmitool > /dev/null
then
- run_cached -s ipmi 300 "ipmitool sensor list | grep -v 'command failed'
| sed -e 's/ *| */|/g' -e 's/ /_/g' -e
's/_*"'$'"//' -e 's/|/ /g' | egrep -v '^[^ ]+ na
' | grep -v ' discrete '"
+ run_cached -s ipmi 300 "waitmax 300 ipmitool sensor list | grep -v 'command
failed' | sed -e 's/ *| */|/g' -e 's/ /_/g' -e
's/_*"'$'"//' -e 's/|/ /g' | egrep -v '^[^ ]+ na
' | grep -v ' discrete '"
fi