OSSPI - how to anchor the process in procmon_local.cfg (260 Views)
Reply
Frequent Advisor
Posts: 68
Registered: ‎09-30-2011
Message 1 of 4 (260 Views)

OSSPI - how to anchor the process in procmon_local.cfg

hey experts..

 

I'd like to know how can I anchor the process.

 

e.g.:

 

I want to monitor "/opt/xpto/a"

 

when I run "ps -ef | grep -v grep | grep /opt/xpto/a"

the output is:

/opt/xpto/a

/opt/xpto/ab

/opt/xpto/abc

 

so, if I run "ps -ef | grep -v grep | grep /opt/xpto/a | wc -l"

the output is:

3

 

the problem is, if I setup the process regarding follwing, will warn.

 

procmon_local.cfg

[xpto]

/opt/xpto/a * 1

 

also I've tryed to use '$' to anchor, but did not work.

procmon_local.cfg

[xpto]

/opt/xpto/a$ * 1

 

any suggestions?

 

thanks in advance

Acclaimed Contributor
Posts: 25,549
Registered: ‎03-06-2006
Message 2 of 4 (242 Views)

Re: OSSPI - how to anchor the process in procmon_local.cfg

[ Edited ]

>I want to monitor "/opt/xpto/a"

 

If you are on Linux, you can simply use -C to find all processes with a basename of "a":

ps -f -C a

 

If on HP-UX, you need to change it to:

UNIX95=EXTENDED_PS ps -f -C a

Frequent Advisor
Posts: 68
Registered: ‎09-30-2011
Message 3 of 4 (225 Views)

Re: OSSPI - how to anchor the process in procmon_local.cfg

Hi Dennis..

 

Thanks, but the idea is to how to anchor the string in procmon_local.cfg.

And not how to use "ps"..

Acclaimed Contributor
Posts: 25,549
Registered: ‎03-06-2006
Message 4 of 4 (207 Views)

Re: OSSPI - how to anchor the process in procmon_local.cfg

>And not how to use "ps"

 

Sorry, your post showed using ps(1) so I thought you had control over the options.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.