Hitachi

JP1 Version 12 JP1/Performance Management - Agent Option for Enterprise Applications Description, User's Guide and Reference


jr3alget

Organization of this page

Format

jr3alget    [RFC-connection-information]
            [target-information]
            [-lasttime timestamp-file-name]
            [output-destination]
            [-cnf environment-parameters-file-name]
            [-help]
            [-v]

Function

The jr3alget command extracts the CCMS alert information of the SAP system.

Host that can execute the command

PFM - Agent for Enterprise Applications

Execution permissions

In Windows:

None

In Linux:

None

Command installation directory

In Windows:
installation-folder\agtm\evtrap\
In Linux:
/opt/jp1pc/agtm/evtrap/

Arguments

RFC-connection-information

Specifies the information needed to establish RFC connection with the SAP system for command execution.

You can omit specification of this argument if you have specified the RFC connection information in the environment parameters file (CONNECT section). If the RFC connection information is specified in both the environment parameters file and the command, the command specification takes effect. For details about the environment parameters file, see 6.4.3 Environment parameters file for extracting CCMS alert information by command execution.

The following describes the RFC information argument:

-h application-server-host-name

Specifies as 1-100 single-byte alphanumeric characters the name of the connection-target application server host. You must specify one of the following:

  • Host name specified in the hosts file

  • IP address

  • SAP router address

You can verify the application server host name by transaction code SM51.

When you specify this option, you must also specify the -s option.

-s system-number

Specifies the system number for identification by the application server host specified with the -h option. You must specify a value in the range 0-99.

When you specify this option, you must also specify the -h option.

-c client-name

Specifies as 1-3 bytes the client name of the user that is to be used for connection. You must specify a value in the range 0-999.

When you specify this option, you must also specify the -u option together with the -p or -p2 option.

-u user-name

Specifies as 1-12 single-byte alphanumeric characters the user name that is to be used for connection.

When you specify this option, you must also specify the -c option together with the -p or -p2 option.

For details about the SAP users that can be specified, see SAP users used for establishing connection.

-p password

Specifies the password for the user specified in the -u option. The permitted value is 1-8 single-byte characters.

This option and the -p2 option are mutually exclusive.

When you specify this option, you must also specify the -c and -u options.

Specify this option when the SAP system is applying the conventional password rules.

For details about the characters permitted for the password, see SAP users used for establishing connection.

-p2 extended-password

Specifies the extended password for the user specified in the -u option. The permitted value is 1-40 single-byte characters. This value is case sensitive.

This option and the -p option are mutually exclusive.

When you specify this option, you must also specify the -c and -u options.

Specify this option when the SAP system is applying the extended password rules.

For details about the characters permitted for the extended password, see SAP users used for establishing connection.

-l language

Specifies the language for the user specified with the -u option. You must specify a double-byte ISO ID or a single-byte language key used in the SAP system. For example:

  • To specify Japanese: JA

  • To specify a language other than Japanese: EN

If you omit this option, the user's language used in the connection-target system is assumed.

When you specify this option, you must also specify the -c option, the -u option, and the -p or -p2 option.

-codepage code-page

Specifies the code page to be used when character encoding is converted in the Unicode version of the SAP system.

The code page must be specified together with a language in the -l option.

Specify the combination of language and code page as shown below. If any other combination of language and code page is specified, an encoding error may occur in the information acquired from the SAP system.

Table 11‒3: Combination of language and code page specifications

Connection-target SAP system

Connection language

Language (-l)

Code page (-codepage)

Unicode version

Japanese

JA

8000

English

EN

No need to specify. If you specify a code page, specify 1100.

Non-Unicode version

Japanese

JA

No need to specify. If you specify a code page, specify 8000.

English

EN

No need to specify. If you specify a code page, specify 1100.

To set the code page to be used to convert character codes at the connection-target SAP system (Unicode version), you can also use the SAP_CODEPAGE environment variable provided by the SAP system. If the code page setting is specified in both the SAP_CODEPAGE environment variable and in this option, this option takes effect.

If this option is omitted, the connection-target system's default code page is assumed.When you specify this option, you must also specify the -c option, the -u option, and the -p or -p2 option.

target-information

Specifies information that identifies the CCMS alert information that is to be extracted.

You can omit specification of this argument if you have specified the target information in the environment parameters file (TARGET section). If target information is specified in both the environment parameters file and the command, the command specification takes effect. For details about the environment parameters file, see 6.4.3 Environment parameters file for extracting CCMS alert information by command execution.

The following describes the target information argument:

-ms monitor-set-name

Specifies as 1-60 single-byte alphanumeric characters the monitor set name. The monitor set name is displayed as CCMS monitor set on the Alert Monitor (transaction code RZ20) of the SAP system.

When you specify this option, you must also specify the -mn option.

-mn monitor-name

Specifies as 1-60 single-byte alphanumeric characters the monitor name defined in the monitor set. The monitor name is displayed in the tree of the CCMS monitor set on the Alert Monitor (transaction code RZ20) of the SAP system.

When you specify this option, you must also specify the -ms option.

-lasttime timestamp-file-name

If only the CCMS alert information that was output after the previous command execution is to be extracted, this option specifies the name of the timestamp file used for managing the previous extraction time.

The permitted value is 1-255 single-byte characters.

If you specify a relative path, make sure that it is relative to the work directory for the command. If you have not specified a work directory for the command in the WORKDIR label of the COMMAND section in the environment parameters file, specify the path relative to the current directory.

If you omit this option, the system assumes the period from 00:00:00 to 23:59:59 on the command execution date.

If the specified timestamp file does not exist the first time the command is executed with this argument specified, a new timestamp file is created. CCMS alert information is not output during such a first-time execution.

output-destination

Specifies the output destination of the CCMS alert information. When you omit this argument, CCMS alert information separated by linefeed codes is output to the standard output.

There are two different file formats used by PFM - Agent for Enterprise Applications to output CCMS Alert Information as described below.

  • WRAP1

    This file is in wraparound format, which means that data is overwritten when the amount of CCMS Alert Information reaches a specified value. There can be only one output file when using this format.

  • WRAP2

    In this file format, when the amount of CCMS Alert Information reaches a specified value, all data is deleted from the file and then new data is written from the beginning of the file. When the amount of data in the first file reaches a specified value, new data is written in the second file, starting at the top, after all existing data is deleted from the second file. When all of the files are full, new data is again written in the first file, starting at the top, after all existing data is deleted from the first file.

    There can be two through nine output files when using this format. The default is 5 output files. The number of output files is specified in the NUM label in the EXTRACTFILE section in the environment parameter file.

If you want to change the format of output files, first stop any products monitoring the output files, and then delete the output files and their management files (if there is any).

The following describes the output destination argument:

-x The-name-of-the-storage-file-in-WRAP1-format

Specifies the relative or full path name of the WRAP1-format file in which CCMS Alert Information is to be stored. The permitted value is 1 through 251 bytes of single-byte characters.

If you specify a relative path, make sure that it is relative to the work directory for the command. If you have not specified a work directory for the command in the WORKDIR label of the COMMAND section in the environment parameters file, specify the path relative to the current directory.

There is a header line of management information at the beginning of this file.

The default file size is 1,024 kilobytes. To change the file size, use the SIZE label in the EXTRACTFILE section of the environment parameters file.

A management file having the name storage-file-name.ofs is created in the same directory as for the storage file. For example, if ALERT is specified as the storage file name, a management file named ALERT.ofs is created in addition to the ALERT file. If you delete the storage file, you must also delete this management file.

The -x, -x2, and -xw options are mutually exclusive.

-xw The-prefix-for-the-storage-files-in-WRAP2-format

Specifies the name of WRAP2-format file in which CCMS Alert Information is to be stored. The permitted value is 1 through 254 bytes of single-byte characters. For the actual file names, a one-byte number is added at the end of the specified file name.

A number in the range from 1 through the NUM label value is assigned to the specified file name based on the value specified in the NUM label in the EXTRACTFILE section in the environment parameter file. For example, if ALERT is specified, storage files ALERT1 through ALERT5 are created by default.

If you specify a relative path, specify a path relative to the command's working directory. If no working directory is specified for commands in the WORKDIR label of the COMMAND section in the environment parameter file, specify a path relative to the current directory.

The default file size is 10,240 kilobytes. If you want to change the file size, specify a new size in the SIZE label in the EXTRACTFILE section in the environment parameter file.

The -xw, -x, and -x2 options are mutually exclusive.

-x2

Specifies that CCMS Alert Information is to be output to the file that was specified in the X2PATH label in the EXTRACTFILE section in the environment parameter file.

The -x2, -x, and -xw options are mutually exclusive.

-cnf environment-parameters-file-name

Specifies the name of the environment parameters file that is to be referenced by the command. The permitted value is 1-255 bytes of single-byte characters.

If you specify a relative path, make sure that it is relative to the current directory for the command.

If you omit this argument, the system assumes jr3alget.ini, which is the default environment parameters file in the current directory. If there is no default environment parameters file, PFM - Agent for Enterprise Applications assumes the default settings for an environment parameters file.

For details about the environment parameters file and the default settings, see 6.4.3 Environment parameters file for extracting CCMS alert information by command execution.

-help

Specifies that the usage of the jr3alget command is to be displayed at the standard output.

-v

Specifies that a message indicating the processing status of the jr3alget command is to be output to the standard output. If you omit this option, no message indicating the processing status of the command will be output.

SAP users used for establishing connection

To collect CCMS alert information, the jr3alget command executes the external management interfaces defined in the SAP system using RFC (communication protocol of SAP AG). For details, see 3.1.5(2) Creating SAP users that are to be used by PFM - Agent for Enterprise Applications.

Notes

Output format and contents

The following is the default output format for CCMS alert information, where < > enclose a field ID:

[Figure]

If the value of a CCMS alert information item is shorter than the predefined field length, the remaining area is padded with single-byte spaces. The following table lists and explains the values that are output:

Table 11‒4: CCMS alert information that is output

Field ID

Description

Source

Length (bytes)

<ALSYSID>

Name of the SAP system

Alert ID (AID)

(BAPIAID)

8

<MSEGNAME>

Name of the monitoring segment

40

<ALUNIQNUM>

Unique ID used by AID

10

<ALERTDATE>

Date the alert occurred (YYYYMMDD)

8

<ALERTTIME>

Time the alert occurred (HHMMSS)

6

<MTSYSID>

Name of the SAP system

ID of the MTE associated with the alert (TID)

(BAPITID)

8

<MTCLASS>

MTE type

3

<MTNUMRANGE>

Range of numbers (such as resident or temporary)

3

<MTMCNAME>

Name of the monitoring context

40

<MTUID>

Unit ID used by TID

10

<VALUE>

Warning value (corresponding to the color of the CCMS alert entry that can be viewed with transaction code RZ20):

  • 0: Gray (invalid information)

  • 1: Green (OK)

  • 2: Yellow (warning)

  • 3: Red (problem or error)

Alert severity level (BAPIALDATA)

11

<SEVERITY>

Severity level (0-255; severity increases as the value increases)

<FIELDNAME>

Abbreviation of MTE

General property (BAPIALERT)

40

<STATUS>

Alert status

11

<OBJECTNAME>

Name of the monitoring object

40

<MANDT>

Client

3

<USERID>

SAP user

12

<REPORTEDBY>

Reporter (logical name)

16

<STATCHGDAT>

Last date the status changed

8

<STATCHGBY>

Last user who changed the status (logical name)

16

<STATCHGTIM>

Last time the status changed

6

<MSCGLID>

Message ID when a message with the log attribute activated an alert

50

<MSGCLASS>

Message recorder

Message

16

<MSGID>

Message ID

30

<MSGARG1>

Character string for message insert word 1

128

<ARGTYPE1>

Type of message insert word 1

1

<MSGARG2>

Character string for message insert word 2

128

<ARGTYPE2>

Type of message insert word 2

1

<MSGARG3>

Character string for message insert word 3

128

<ARGTYPE3>

Type of message insert word 3

1

<MSGARG4>

Character string for message insert word 4

128

<ARGTYPE4>

Type of message insert word 4

1

<MSGTEXT>

Message text

128

<MSG>

Translated message

255

Return value

0

Normal termination

1 or greater

Abnormal termination

Example

This example outputs CCMS alert information using SAP CCMS Monitor Templates as the monitor set name and Entire System as the monitor name. The RFC connection information has already been defined in the environment parameters file.

jr3alget -ms "SAP CCMS Monitor Templates" -mn "Entire System"

The output example from this command is as follows:

[Figure]