Henrik,
FYI I just tried adding the m flag, and it works beautifully:
I changed hobbitclient-linux.sh.
Before:
ps -Aw -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rsz,vsz,cmd
After:
ps -Awm -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rsz,vsz,cmd
All proc checks seem to work as normal, and with the m flag I am now able to use TRACK on process threads (which are normally not displayed).
Thanks for making Hobbit so flexible!
-Charles
From: Charles Jones -X (charljon - Cisco Learning Institute at Cisco)
Sent: Sat 7/29/2006 12:41 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] RE: [Hobbit] Using variables in clientlaunch.cfg?
Henrik,
I'm not sure what you mean by the header. I assume you mean the column headings on normal ps output:
$ ps aux |head -1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
It appears that the command line ps options that I want to use, drastically change the column header:
$ ps -welfm |head -1
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
Will hobbit handle this? If not, can I hack it to make it do so? If I have to I suppose I could use a shell script wrapper for ps that wiill spoof a header that the client is expecting.
-Charles
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Fri 7/28/2006 11:59 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] RE: [Hobbit] Using variables in clientlaunch.cfg?
On Fri, Jul 28, 2006 at 11:12:21PM -0700, Charles Jones wrote:
I just thought of another way to do this. I could modify the ps arguments
that hobbit uses, and then just use hobbit-client.cfg with the PROC and
TRACK options, and then I won't have to deal with using an ext script at all.
$ ps -welfm |egrep '(java.+tc_1_1)'|grep -v grep |wc -l
66
The "m" flag shows all sub processes/threads. Without it, it would only show a single java process.
So this would work, but the question is, would hobbit still correctly parse the
ps output with those flags?
As long as it has a header with the same identifier for where the commandline is,
then it should work.