Hitachi

JP1 Version 12 for UNIX Systems JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference


7.1.1 Setting a workgroup file for collecting workgroup information

To collect workgroup information, you need to specify a workgroup file. The workgroup file is used to specify information such as the workgroup name.

You can use only one workgroup file. Changing the file name invalidates the file.

The workgroup file name is:

/opt/jp1pc/agtu/agent/wgfile

This workgroup file includes only a comment line (a hash mark (#) is placed at the beginning of the line). To specify information, directly edit this event file or copy this file and then edit it.

Organization of this subsection

(1) Setting up the workgroup file

To specify the workgroup file:

  1. Use a text editor to open the workgroup file.

  2. Add the parameters given in the following subsection to the workgroup file.

    For details about how to specify parameters, see (2) Specifying the workgroup file.

  3. To collect information from multiple workgroups, specify the parameters for each workgroup.

  4. Save the workgroup file.

    Always save the file under the default workgroup file name wgfile.

    To return the setting content of the wgfile file to the status that was effective at the time of installation, copy wgfile.model, which is the model file of the wgfile file, to wgfile.

Note:

When you specify multiple parameters, if at least one of the specified parameter values matches the value of a field of the Process Detail (PD) record, performance data is stored in the Workgroup Summary (PI_WGRP) record.

(2) Specifying the workgroup file

(a) Parameter specification format

The following describes the format used to specify parameters:

workgroup=workgroup-name
[users=UNIX-user-name] or [users_02=UNIX-user-name]
[groups=UNIX-group-name] or [groups_02=UNIX-group-name]
[programs=program-name] or [programs_02=program-name]
[arguments_02=argument-of-monitoring-program]
[regexp=monitoring-conditions]
Notes:
  • The end of each file parameter is the linefeed.

  • Always specify the workgroup parameter at the beginning. The order of other parameters is as you like.

  • You can omit parameters enclosed by square brackets ([]). However, in addition to the workgroup parameter, you must specify at least one parameter.

  • The system does not differentiate between upper and lowercase characters in each parameter.

  • Do not insert a space character or tab character before or after the equal sign (=).

  • When one parameter is extended to multiple lines, insert a comma (,) at the end of the line.

  • To insert a comment line, place a hash mark (#) at the beginning of the line.

  • You can use a regular expression to specify parameters. For details about regular expressions, see the manual for each OS. Also, for examples using regular expressions, see (3) Workgroup file specification example.

  • You can specify multiple values for parameters other than the workgroup parameter. Use a delimiter character to separate specification values. Usually, you use a comma or space character as the delimiter; however, when you specify a double quotation mark (") at the beginning of the specification value in the arguments_02, groups_02, programs_02 or users_02 parameter to specify the monitoring target, use a double quotation mark (") as the delimiter and a linefeed ("\n) as the termination character. For details, see Parameter details.

  • When you specify a double quotation mark (") at the beginning of a specification value in the arguments_02, groups_02, programs_02 or users_02 parameter, if there is no corresponding delimiter character, the value is not recognized as the monitoring target because the range of the character string is not specified.

  • When you specify a double quotation mark (") at the beginning of the specification value in the arguments_02, groups_02, programs_02 or users_02 parameter, a double quotation mark (") that exists alone before the corresponding delimiter character is ignored. If you want to include a double quotation mark (") in the monitoring target, enter two double quotation marks ("").

  • For the arguments_02, groups_02, programs_02 and users_02 parameters, you can mix specification values that do and do not include a double quotation mark (") at the beginning.

  • To monitor a command line whose suffix is a space character, use the regexp parameter.

Specification examples

Command line to be monitored

How a workgroup is specified

"command1Δarg1Δarg2Δarg3"

arguments_02="command1Δarg1Δarg2Δarg3"

"command1Δarg1Δarg2Δarg3Δ"

regexp={arguments_02="command1Δarg1Δarg2Δarg3Δ"}

"command1Δarg1Δarg2Δarg3[Figure]..."

regexp={arguments_02="command1Δarg1Δarg2Δarg3*"}

Note:

Δ: One single-byte space

(b) Parameter details

The following explains each parameter. For parameter setting examples, see (3) Workgroup file specification example.

workgroup=workgroup-name

Use alphanumeric characters to specify the name of the workgroup to be monitored. The character string for the name can contain a maximum of 2,037 bytes, including linefeeds; however, the Store database stores a maximum of 29 bytes. If you specify more than one workgroup name using the same name, the last specified one (that is, the workgroup having the largest row number) is applied.

users=UNIX-user-name

Specify the names of UNIX users from which to collect information as a workgroup. UNIX user names can contain a maximum of 2,041 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

To specify more than one UNIX user name, use at least one comma or space character to separate the names. All specified users become the target of monitoring.

The values specified in this parameter are displayed in the Users (USERS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Real User (REAL_USER_NAME) field of the Process Detail (PD) record.

users_02=UNIX-user-name

Specify the names of UNIX users from which to collect information as a workgroup. This parameter is used to extend the users parameter to specify user names.

If you add a double quotation mark (") at the beginning of the specification value, characters up to the next delimiter character (" or "\n) are recognized as the specification value. For example, the specification value can include space characters and commas, which are the delimiter characters in the users parameter. If you do not add a double quotation mark ("), the same operation as with the users parameter takes place. If you use the extended specification method, the double quotation mark (") is treated as the parameter delimiter character and "\n is treated as the termination character. To use the extended specification method to specify a double quotation mark (") for the specification value, enter two double quotation marks (""). UNIX user names can contain a maximum of 2,038 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

The values specified in this parameter are displayed in the Users (USERS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Real User (REAL_USER_NAME) field of the Process Detail (PD) record.

groups=UNIX-group-name

Specify the names of UNIX groups from which to collect information as a workgroup. UNIX group names can contain a maximum of 2,040 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

To specify more than one UNIX group name, use at least one comma or space character to separate the names. All specified users become the target of monitoring.

The values specified in this parameter are displayed in the Groups (GROUPS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Real Group (REAL_GROUP_NAME) field of the Process Detail (PD) record.

groups_02=UNIX-group-name

Specify the names of UNIX groups from which to collect information as a workgroup. This parameter is used to extend the groups parameter to specify group names.

If you add a double quotation mark (") at the beginning of the specification value, characters up to the next delimiter character (" or "\n) are recognized as the specification value. For example, the specification value can include space characters and commas, which are the delimiter characters in the groups parameter. If you do not add a double quotation mark ("), the same operation as with the groups parameter takes place. If you use the extended specification method, the double quotation mark (") is treated as the parameter delimiter character and "\n is treated as the termination character. To use the extended specification method to specify a double quotation mark (") for the specification value, enter two double quotation marks (""). UNIX group names can contain a maximum of 2,037 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

The values specified in this parameter are displayed in the Groups (GROUPS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Real Group (REAL_GROUP_NAME) field of the Process Detail (PD) record.

programs=program-name

Specify the name of programs to be executed by processes that collect information for a workgroup. The program name can contain a maximum of 2,038 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

To specify more than one program name, use at least one comma or space character to separate the names. All specified programs become the target of monitoring.

The values specified in this parameter are displayed in the Programs (PROGRAMS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Program (PROGRAM_NAME) field of the Process Detail (PD) record.

programs_02=program-name

Specify the name of programs executed by processes that collect information for a workgroup. This parameter is used to extend the programs parameter to specify program names.

If you add a double quotation mark (") at the beginning of the specification value, characters up to the next delimiter character (" or "\n) are recognized as the specification value. For example, the specification value can include space characters and commas, which are the delimiter characters in the programs parameter. If you do not add a double quotation mark ("), the same operation as with the programs parameter takes place. If you use the extended specification method, the double quotation mark (") is treated as the parameter delimiter character and "\n is treated as the termination character. To use the extended specification method to specify a double quotation mark (") for the specification value, enter two double quotation marks (""). Program names can contain a maximum of 2,035 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >.

The values specified in this parameter are displayed in the Programs (PROGRAMS) field of the Workgroup Summary (PI_WGRP) record.

You specify the value to be stored in the Program (PROGRAM_NAME) field of the Process Detail (PD) record.

arguments_02=argument-of-monitoring-program

Specify the arguments of programs being monitored as part of this workgroup. Arguments can contain a maximum of 2,034 bytes of alphanumeric characters, including linefeeds. However, the Store database stores a maximum of 29 bytes, and the last character becomes >. To specify more than one argument, use at least one comma or space character to separate the arguments. All specified arguments become the target of monitoring.

You can expand this parameter to specify arguments. If you add a double quotation mark (") at the beginning of a specification value, characters up to the next delimiter character (" or "\n) are recognized as the specification value. For example, a specification value can include a space character or comma, which is the delimiter character.

If you do not add a double quotation mark (") at the beginning of a specification value, the same operation as with usual parameters takes place. If you use the extended specification method, the double quotation mark (") is treated as the parameter delimiter character and "\n is treated as the termination character. To use the extended specification method to specify a double quotation mark (") for the specification value, enter two double quotation marks ("").

The values specified in this parameter are displayed in the Argument Lists (PI_ARGUMENT_LISTS) field of the Workgroup Summary (PI_WGRP) record. You specify the value to be stored in the Argument List (ARGUMENT_LIST) field of the Process Detail (PD) record.

regexp=monitoring-conditions

Use the arguments_02, groups, groups_02, programs, programs_02, users, and users_02 conditions to specify the process monitored as part of this workgroup. You can use a regular expression to specify the process. Processes that partially match this condition are monitored.

If you specify multiple expressions, it is assumed to be an OR statement (logical sum).

Expressions can contain a maximum of 2,040 bytes of alphanumeric characters, including linefeeds. If you specify 30 bytes or more of characters for the condition expression of arguments_02, groups, groups_02, programs, programs_02, users, or users_02, the Store database stores a maximum of 29 bytes, and the last character becomes >.

For details about extended regular expressions, see the manual for each OS.

You can use Portable Operating System Interface for UNIX (POSIX) to specify monitoring conditions. If you use the suffix /i, definition information is stored in the Workgroup Summary (PI_WGRP) record without differentiating between upper and lowercase characters.

For specification examples, see (3) Workgroup file specification example.

(3) Workgroup file specification example

The following examples show workgroup specification files.

Example 1:

This example specifies the following information:

  • Workgroup name: sysadmin

  • Program names: netscape, turkey

Setting example
workgroup=sysadmin
programs=netscape,turkey
Result

Process information whose program names is netscape or turkey is collected.

Example 2:

This example specifies the following information:

  • Workgroup name: argument

  • Argument: data.ini

Setting example
workgroup=argument
argument_02=data.ini
Result

Process information for programs executed with the command line argument data.ini is collected.

Example 3

This example specifies the following information:

  • Workgroup name: programs

  • Program name: spaceΔkey, emacs (Δ is a space character)

Setting example
workgroup=programs
programs_02="space key"
Result

Collects process information for a program named spaceΔkey.

Example 4

This example defines a process that completely matches the following argument:

  • Workgroup name: development

  • Argument: jpcagtuΔ-dΔ/opt/jp1pc/agtu/agent (Δ is a space character)

Setting example
workgroup=development
arguments_02="jpcagtu -d /opt/jp1pc/agtu/agent"
Result

Process information for programs executed with the command line argument jpcagtu -d /opt/jp1pc/agtu/agent is collected.

Example 5

This example specifies the following information:

  • Workgroup name: development

  • Argument: quota_"_middle

Setting example
workgroup=development
arguments_02="quota_""_middle"
Result

Process information for programs executed with the command line argument quota_"_middle is collected.

Example 6

This example uses regular expressions to specify the user name, group name and program name.

In the regular expression, you can enclose each parameter and its value using { and }. Also, you can specify multiple regular expressions using commas (,) to separate them.

This example uses regular expressions to specify the following information:

  • Workgroup name: Regexp

  • UNIX user name: .*adm.?

  • UNIX group name: .*adm.*

  • Program name: jpcagt.*, .*grd

  • Argument: exΔprocess (Δ is a space character)

Setting example
workgroup=Regexp
regexp={users=.*adm.?},{groups=.*adm.*},{programs=jpcagt.*/i,.*grd},{arguments_02="ex process"}
Result

Process information for the executed process that matches the following condition is collected.

Each condition is assumed to be a logical OR statement.

  • Process information whose UNIX user name contains adm and consists of four or more characters.

  • Process information whose UNIX group name contains adm

  • Process information whose program name is not case sensitive and begins with jpcagt or end with grd.

  • Process information for programs executed with the command line argument ex process