/opt/special_apps/bin/*::::GroupS

Filenames are expanded to their complete names when a PRM configuration is loaded. Explicit application records take precedence over application records that use wildcards. If an application without an explicit record is matched by several records that use pattern matching, the record closest to the beginning of the configuration file is used.

Pattern matching for renamed application processes

Alternate names specified in application records can also contain pattern matching notation as described in the regexp(5) manpage.

NOTE: Use pattern matching only when it is not practical to list all possible alternate names.

Many complex applications, such as database applications, may assign unique names to new processes or rename themselves while running. For example, some database applications rename processes based on the database instance, as shown in this list of processes associated with a payroll database instance:

db02_payroll db03_payroll db04_payroll dbsmon_payroll dbwr_payroll dbreco_payroll

To make sure all payroll processes are put in the same PRM group, use pattern matching in the alternate names field of the application record, as shown below:

/usr/bin/database::::business_apps,db*payroll

For alternate names and pattern matching to work, the processes must share the same file ID. (The file ID is based on the file system device and the file’s inode number.) PRM performs this check to make sure that only processes associated with the application named in the application record are put in a configured PRM group.

If there are multiple application records with alternate names that match an application name due to redundant pattern matching resolutions, the “first” record to match the application name takes precedence. For example, the application abb matches both of the following application records:

/opt/foo/bin/bar::::GroupA,a*

/opt/foo/bin/bar::::GroupB,*b

Because the *b record is first (based on ASCII dictionary order), the application abb would be assigned to the PRM group GroupB.

You can also use an Extended Regular Expression, or ERE, as the alternate name in an application record. (For more information, refer to the EXTENDED REGULAR EXPRESSION section in regexp(5)). If you do so, the 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. Note that commas within an ERE are not separators for alternate names; they must match commas in the command line.

NOTE: You cannot use colons in an ERE, as PRM uses colons for field separators.

If an ERE alternate name and a non-ERE alternate name both exist for the same application, the non-ERE alternate name takes priority. If multiple ERE alternate names match, the “first” record to match takes precedence. For example, the application abb matches both of the following application records:

/opt/foo/bin/bar::::GroupA,’a.*’ /opt/foo/bin/bar::::GroupB,’.*b’

How PRM manages applications 33