[Xymon] Include full command line in top output
Mailing Lists
lists at dzpconsulting.com
Thu Apr 12 00:27:09 CEST 2012
Sorry about that. I should have proofread my original post.
The -c argument to top will show the full command line instead of just the process name. I've made this change to hobbit client-linux.sh as shown below.
$TOP must be set, the install utility should do that for us if it exists.
if test "$TOP" != ""
then
if test -x "$TOP"
then
echo "[top]"
$TOP -c -b -n 1
fi
fi
I do see the beginning of the command line as shown in this before and after client data snapshot.
BEFORE:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24525 tomcat 20 0 2805m 958m 11m S 52 1.0 45:03.00 java
AFTER:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31104 tomcat 20 0 2365m 942m 11m S 39 1.0 380:45.86 /var/jdk6/bin/java
My thought is that top truncates based on terminal width because I see more of the command line when I run top -c manually in a fullscreen terminal. Is there anyway to get a wider column width when running top via the xymon client?
By the way, I am running Xymon 4.3.0-0.20101114.beta3.
On Apr 11, 2012, at 1:37 PM, Henrik Størner wrote:
On 11-04-2012 22:07, Mailing Lists wrote:
> I'd like to change the contents of the CPU test details page to
> include the full command line in the top output. As I don't have my
> head wrapped fully around how xymon renders this data, I'm not
> certain where to start. I've modified the client side to include the
> -c option but it still looks like the client data is truncating on
> some default width…
I don't understand - what command is it that you want displayed ?
If it's the command used to run "top", then the easiest way is to just add this to the content of the "[top]" section of the message that the client generates (see the xymon-4.3.7/client/YOUR-OS.sh scripts). The "[top]" section is copied verbatim into the cpu-status text, without being processed in any way.
Regards,
Henrik
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
More information about the Xymon
mailing list