6.4.4 Format of the jpcuser command

The following describes the format of the jpcuser command.

Format:

jpcuser record-name
       -file user-created-data-file-name
       [-file user-created-data-file-name]...
       [-debug [0|1|2]]

Note: Square brackets ([]) indicate optional items. A vertical bar (|) has the same meaning as OR. Accordingly, only one of the options separated by a vertical bar can be used at a time.
Description:
The jpcuser command converts user-created data (user-specific performance data output by user commands) into data in a format that PFM - Agent for Platform can use (user data file).
The command can also output debug log information that can be used for checking whether the user-created data is correct. For details about the debug log, see 6.4.6 Checking the debug log to determine whether user-created data is correct.
If an error occurs during execution of this command, an error message is output to the following directory: /opt/jp1pc/agtu/agent/jpcuser/log/public/.
Users who can execute the command:
Users logged in as root
Location of the command:
/opt/jp1pc/agtu/agent/jpcuser/
Arguments:
The first argument in the command line must be record-name. The -debug option can be specified before or after -file options. The arguments that are always required on the command line are record-name and a -file option. The -debug option can be omitted.
record-name
Specify the name of the user-defined record in which performance data is to be stored. You can specify only one of the following names:
  • PD_UPD
  • PD_UPDB
  • PI_UPI
  • PI_UPIB
-file user-created-data-file-name
Specify the name of a user-created data file whose length is no more than 1023 bytes. Use multiple -file options to specify multiple user-created data files. When multiple user-created data files are specified, the command creates one user data file from the user-created data files.
Wildcard characters cannot be used in the file name specified in the -file option.
You can specify a file name by using a relative path name from the current directory, which is the directory in which the command is executed.
If a warning occurs in one or more files when multiple user-created data files are specified, the command returns a value that indicates normal termination with a warning. If an error occurs in at least one file, the command returns a value that indicates abnormal termination or the occurrence of an error.
-debug [0|1|2]
Use this option to specify whether to output only the user data file, only the output debug log information, or both. You can use this option to check whether the user-created data was correct. You can specify only one -debug option in the command.
When -debug 1 is specified, the command performs only debugging. If you want to create user-defined records, specify the -debug option with a value other than 1.
If an error message is output to the debug log, an error might exist in the user command scripts.
If this option is not specified, the command does not output debug log information.
The following table explains the values that can be specified in the -debug option.

Table 6-25 Values specified for the debug option

ValueUser data file output?Debug log file output?
0YesNo
1NoYes
2YesYes
Other valuesYesNo
No value specifiedYesNo
Legend:
Yes: The file is output.
No: The file is not output.
The user data file is created with the name jpcuser_XXX in the /opt/jp1pc/agtu/agent/jpcuser/userdata directory. The XXX part represents the record type (UPD, UPDB, UPI, or UPIB).
The debug log is created with the name jpcuser_dbg_XX.log in the /opt/jp1pc/agtu/agent/jpcuser/debug directory. The XX part is a two-digit number that indicates how new the log file is. The following table explains the naming rule for debug log files.

Table 6-26 Example of debug log output

Debug log file nameExplanation
jpcuser_dbg_01.logThe latest debug log file
jpcuser_dbg_02.logThe second latest debug log file
jpcuser_dbg_03.logThe third latest debug log file
......
Return value:
0Normal termination
1 to 100Normal termination with a warning
101 to 255Abnormal termination or the occurrence of an error