5.Enable PRM’s application manager if it is not already enabled:

#prmconfig -e APPL

Alternatively, enable all PRM resource managers using prmconfig -ewithout any additional arguments:

#prmconfig -e

Example: Grouping an application by its alternate names and functions

To place an application in the same group as its alternate names, add the application’s name to the list of alternate names. For example, to put the main database program in the group order_process, add it to the list of alternate names in the record, as shown below:

#PRM application records

/usr/bin/database::::business_apps,db_inventory,db_payroll /usr/bin/database::::order_process,db_orders,database

Example: Assigning a running application to another group

Assume the sales department purchased a new application called CustomerTrack to help them track their customer base. Because the application does not have a record, it runs in the group of the users that invoke it. Because everyone on the sales staff is assigned to the sales group, CustomerTrack runs in the sales group.

However, due to the importance of this application as a sales tool, the PRM administrator decides to assign it to the crit_apps group where it is assured sufficient resources.

The procedure to re-assign the application is outlined below.

1.Open the desired configuration file in a text editor.

2.Add an application record for CustomerTrack with crit_apps as the assigned group.

3.Configure PRM using -kto keep the existing assignments of users, processes, and groups:

# prmconfig -k

4.Wait for the application manager to automatically move the processes. This will take no longer than 30 seconds, the default length of the application manager polling interval. Alternatively, move the processes yourself as discussed below.

a.Find the process ID for CustomerTrack using the ps command:

#ps -efP grep CustomerTrack

UID

PRMID

PID

PPID

C

STIME TTY TIME

COMMAND

root

PRM_SYS

4435

4220

6

15:16:21 ttyp2 0:00

grep CustomerTrack

advisor4

sales

4418

4220

4

15:11:18 ttyp2 0:00

CustomerTrack

b.Move the CustomerTrack process and all its child processes by process group PID to the PRM group crit_apps using prmmove:

# prmmove crit_apps -g 4418

5.Verify that CustomerTrack is running in the crit_apps group by using the ps command:

# ps -PR crit_apps

PRMID

PID

TTY

TIME

COMMAND

crit_apps

4418

ttyp2

0:00

CustomerTrack

crit_apps

4485

ttyp2

0:00

CustomerOrder

crit_apps

4492

ttyp2

0:00

Issue

Removing an application’s group assignment

To remove an application record with a text editor:

1.Open the configuration file in a text editor.

68 Configuring and enabling PRM on the command line

Page 68
Image 68
HP Process Resource Manager (PRM) manual Removing an application’s group assignment, #prmconfig -e Appl, # prmconfig -k