Hitachi

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


7.4.1 Overview of the functionality for collecting user-specific performance data

The following explains functionality for collecting user-specific performance data and functionality for periodically executing user commands.

Organization of this subsection

(1) Functionality for collecting user-specific performance data

This functionality uses the jpcuser command to convert custom performance data output by users to a text file, into a format that can be stored in records provided by PFM - Agent for Platform (PD_UPD, PD_UPDB, PI_UPI, PI_UPIB, PI_XUI1 to PI_XUI5). To use this functionality for collecting user-specific performance data, a command must be created to output performance data to text files ahead of time.

The following figure shows how user-specific performance data is collected.

Figure 7‒1: Mechanism for collecting user-specific performance data

[Figure]

The following describes the processing corresponding to the numbers in the figure.

  1. User commands are executed to create user-defined data.

    The user commands collect performance data, such as process name, process ID, and number of processes, and output the collected data to a text file. The data in the text file is called user-created data.

    These user commands must be created as scripts beforehand.

  2. The jpcuser command is executed to convert the user-created data.

    The jpcuser command converts the user-created data into a file in a format that can be managed by PFM - Agent for Platform. The file resulting from the conversion is called a user data file.

  3. The contents of the user data file are saved in user-defined records every time PFM - Agent for Platform performs record collection.

    PFM - Web Console must be set beforehand so that PFM - Agent for Platform collects the records from the user data file.

    When no user data file has been created due to a failure to execute a user command or for other reasons, the KAVF10707-W message# is output, and collection of the applicable records is skipped.

    #

    •Suppose that PFM - Agent for Platform is configured to execute user commands prior to record collection by using the functionality for periodically executing user commands. In this case, if PFM - Agent for Platform fails to activate a user command or if a user command execution times out, this message is not output.

    •When PFM - Agent for Platform repeatedly fails to execute a user command, this message is output only once an hour for the same record.

To collect performance data periodically, use the functionality for periodically executing user commands to set a user command, and the jpcuser command, to execute automatically.

Important

When outputting a file specified for the jpcuser command argument, or file in a batch file or script that executes the jpcuser command, specify a directory other than the installation directory.

(2) Functionality for periodically executing user commands

This functionality executes a user command from PFM - Agent for Platform at a fixed interval without using a schedule functionality such as the cron command. The method for creating user data files from user commands is the same as described in (1) Functionality for collecting user-specific performance data.

The functionality for periodically executing user commands runs in accordance with the Collection Interval setting specified for user records. User commands are therefore executed during historical data collection and alarm monitoring data collection but not during real-time data collection.

As for the timing of executing user commands, you can select one of the following options: after record collection (after user data files are loaded) and before record collection (before user data files are loaded). By default, "before data collection" is set.

The following figure shows the flow of processing for functionality for periodically executing user commands.

Figure 7‒2: Flow of processing for functionality for periodically executing user commands (when user commands are to be executed after record collection)

[Figure]

Figure 7‒3: Flow of processing for functionality for periodically executing user commands (when user commands are to be executed before record collection)

[Figure]

Functionality for periodically executing user commands determines whether the previously started user command has terminated, and skips user command processing if it is executing.

Note

For versions of PFM - Web Console earlier than 09-00, functionality for periodically executing user commands cannot batch distribute properties to more than one PFM - Agent.

(3) Notes on functionality for periodically executing user commands

Executable files

The file formats that can be executed by functionality for periodically executing user commands are as follows:

  • Executable file#

  • Shell script file#

#

The execution attribute must be added.

Accounts

Use the root user permission account to execute functionality for periodically executing user commands. Make sure that the root user permission account can access the following files and resources:

  • Files (user commands) specified for functionality for periodically executing user commands

  • Resources referenced or updated from those files (user commands)

To execute a file in the NFS mount directory, make sure that the root user permission for the host account can access the file.

Environment variables

The environment variables valid for executing functionality for periodically executing user commands are the root-user permission environment variables defined when the Performance Management program service starts up. Profile information is not loaded when functionality for periodically executing user commands is executed.

Current directory

The following PFM - Agent for Platform service directories are used as the current directory for executing functionality for periodically executing user commands:

  • Physical host environment: /opt/jp1pc/agtu/agent

  • Logical host environment: environment-directory/jp1pc/agtu/agent

File umask

The umask value for using functionality for periodically executing user commands is set to 000 (file permission is set to 777). To change the umask value, set umask again in the script file or program to be executed.

Notes on executing user commands before record collection
  • When a user command times out, it is forcibly terminated. Processes activated from inside the user command, however, are not forcibly terminated. If necessary, add a new user command that allows you to end processes activated from the previously activated user command when the processes have timed out.

  • When no user command is specified, when an attempt to activate a user command fails, or when a user command times out, the record collection process corresponding to the user command is skipped.

  • User commands are executed after other records are collected. For this reason, there is a time lag between the timing of a collection event and the execution of user commands.

  • Even when a user command is being executed, the Agent Collector service status is "Busy".

Notes on changing the timing of executing user commands
  • If you change the timing of executing user commands from after record collection to before record collection, the results of the user commands executed prior to this change will not be collected. If the user commands that were executed prior to the change have not finished by the time the record collection process immediately after the change begins, these user commands are forcibly terminated.

    Note that both the execution of user commands and the record collection process for the record for which the user command was forcibly terminated are skipped. (The execution of user commands and the record collection process are resumed the next time a record is collected.)

    Figure 7‒4: Notes on changing the timing of executing user commands from after record collection to before record collection

    [Figure]

Other notes
  • Programs that require interactivity cannot be executed.

  • Programs containing the stty, tty, tset, or script command that requires an interactive environment cannot be executed.

  • Resident programs (programs that do not terminate) cannot be executed.

  • Programs without the execution attribute added cannot be executed.

  • Do not set up programs on removable disks or other disks that cannot be set up.

  • The contents of the standard output and standard error output cannot be obtained for executed programs.

  • When performing file output from an executed program, use an absolute path to specify the output destination file. If an absolute path is not specified, the directory for the PFM - Agent for Platform service is used as the current directory.