Module: check_mk
Branch: master
Commit: b3ef665a7c4ba040ae93c84b2086d12336131e63
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3ef665a7c4ba0…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Dec 8 13:53:24 2015 +0100
#1315 check_mk_agent.linux: The ps section of the agent now supports long usernames
The ps command now return usernames up to 32 digits instead falling back to the user_id.
Thanks for this Patch to Vinny Wadding
---
.werks/1315 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1315 b/.werks/1315
new file mode 100644
index 0000000..cf995d8
--- /dev/null
+++ b/.werks/1315
@@ -0,0 +1,11 @@
+Title: check_mk_agent.linux: The ps section of the agent now supports long usernames
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449579105
+Class: feature
+
+The ps command now return usernames up to 32 digits instead falling back to the user_id.
+Thanks for this Patch to Vinny Wadding
+
diff --git a/ChangeLog b/ChangeLog
index 197dbbb..a5e3a1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
* 2884 mssql_blocked_sessions: the state of the blocked sessions is now configurable
* 1313 apc_sts_inputs: New Check for APC Static Transfer Swichtes: Input Phases
* 1314 apc_sts_source: New Check to monitor if the input source changes on APC STS
devices
+ * 1315 check_mk_agent.linux: The ps section of the agent now supports long
usernames...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 9d4e18c..f0f9f15 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -214,7 +214,7 @@ grep ^/dev < /proc/mounts
# processes including username, without kernel processes
echo '<<<ps>>>'
-ps ax -o user,vsz,rss,cputime,etime,pid,command --columns 10000 | sed -e 1d -e 's/
*\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4\/\5,\6)
/'
+ps ax -o user:32,vsz,rss,cputime,etime,pid,command --columns 10000 | sed -e 1d -e 's/
*\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4\/\5,\6)
/'
# Memory usage
echo '<<<mem>>>'