Operating System - HP-UX
1753776 Members
7131 Online
108799 Solutions
New Discussion юеВ

PRM - capturing script application

 
SOLVED
Go to solution
NHL
Frequent Advisor

PRM - capturing script application

Hi folks,

hpux 11.11, PRM C.03.00.

I have an application that we need to resource restrict with PRM.

In ps the output looks like this:
root 1247 1246 0 13:48:07 pts/0 0:00 /bin/ksh /opt/coins9/dev/bin/session_%normal.sh -p pm99b.p -b

There will be many sessions like this but I'm only interested in the ones that contain pm99b.p .

Ive got this entry for it in /etc/prmconf:
REPORTS:15:1::
/bin/ksh::::REPORTS,.*pm99b.p*

The trouble is I can only see prm capture this (via prmmonitor) when I run the program with 'prmrun -g REPORTS progname', I can't see it when I just run it without prmrun.

The root user is in the PRM REPORTS group.

I need to find out how to get this script captured by PRM without having to specify prmrun.

Any help on this would be much appreciated before I pull whats left of my hair out ;)

Cheers,
Nick .
7 REPLIES 7
Solution

Re: PRM - capturing script application

IS it just me, or are you trying to use the ERE (Extended Regular Expression) syntax for the argument without putting it in quotes. Shouldn't the line look like this?

/bin/ksh::::REPORTS,'.*pm99b\.p.*'

HTH

Duncan

I am an HPE Employee
Accept or Kudo
NHL
Frequent Advisor

Re: PRM - capturing script application

Hi Duncan,

there's no mention of having to quote the RE in the docs or the examples I've seen.
However, I've just changed it to '*pm99b\.p*' and it seems to be working !

Thanks for your help.

Nick .
NHL
Frequent Advisor

Re: PRM - capturing script application

Hi again,

I spoke too early, the problem is still there.

I have a user called 'coins'.
This user is in PRM groups REPORTS and WEB.

Here's the application records from prmconf:
/bin/ksh::::REPORTS,'.*pm99b\.p*'

/usr/opt/dlc/v91d/bin/_progres::::WEB,'.*ubpid.*'

When this coins user runs anything it all goes into the REPORTS group. Nothing is using the WEB group.

Anyone got any ideas please ?

Thanks,
Nick .
NHL
Frequent Advisor

Re: PRM - capturing script application

Just noticed if I change the coins user record in prmconf from

coins::::REPORTS,WEB,OTHERS

to

coins::::WEB,REPORTS,OTHERS

then everything goes into the WEB group !

It's totally ignoring the Application records...

Any ideas ?

Nick.
rariasn
Honored Contributor

Re: PRM - capturing script application

Hi NHL,

# ps -efP

-P option:

Add column prmid (for -l) or prmgrp (for -f or -fl) immediately before column pid.

rgs,

Jonathan Fears
Trusted Contributor

Re: PRM - capturing script application

In PRM 3.0, for scripts only the first argument after the shell (and possibly after shell options) is recognized as the alternate name. So the application record "/bin/ksh::::REPORTS,.*pm99b.p*" is not doing what you think is. You could use "session_%normal.sh" (the script name) as the alternate name but nothing after it.

Beginning with PRM 3.2, you can use EREs in alternate names. From the PRM 3.2 user's guide:
"...[T]he ERE should be the only alternate name in the record, and it should be within single quotes. Other records can still have non-ERE alternate names for the same application. Note that while non-ERE alternate names are matched against non dash command-line arguments, Extended Regular Expression alternate names are matched against the entire available command line."
So with PRM 3.2, your application records should behave as you are expecting. For PRM 3.0 you would have to use some scripting outside of the product using prmrun to get the process in the correct group based on the something other than the script name.

Hope this helps.
NHL
Frequent Advisor

Re: PRM - capturing script application

Ahh I see, looks like I'll have to upgrade PRM then ... :(

Thanks
Nick .