jpcrdef delete
- Organization of this page
Format
jpcrdef delete [-y] [-mx maximum-heap-size] [-ms initial-heap-size] input-file
Function
The jpcrdef delete command connects to PFM - Manager and deletes a report definition. When you specify a report definition directory, all the lower-level report definitions and the report definition directory itself are deleted. The command acquires the report definitions and report definition directory to be deleted from the XML-format parameter file specified as a command line argument. You can specify multiple report definitions and report definition directories in order to delete them in batch.
Hosts that can execute the command
PFM - Web Console
Execution permission
- In Windows:
-
User with Administrators permissions
- In UNIX:
-
User with root user permissions
To execute this command, a key file for authentication needs to be created in advance for a user account with administrator user permissions or general user permissions# for Performance Management. For details, see the jpcmkkey command.
- #
-
Execution permissions for Performance Management that are required for a Performance Management user or JP1 user.
Installation directory
- In Windows:
-
installation-folder\tools\
- In UNIX:
-
/opt/jp1pcwebcon/tools/
Arguments
-y
Specifies that no deletion confirmation message is to be displayed. When this option is omitted, a deletion confirmation message is displayed for each <report-definition>. When y or Y is entered as the response to the deletion confirmation message, the command deletes the report definition. When any other value is entered, the command does not deletes the report definition and displays a deletion confirmation message for the next <report-definition>.
-mx maximum-heap-size
Specifies the maximum heap size for java.exe (in megabytes). The default is 128 MB. The maximum size that can actually be acquired depends on the system. If the specified value does not satisfy the following conditions, an invalid command line format results:
-
Integer in the range 1 to 2,048
-
Value specified in -mx >= value specified in -ms
-ms initial-heap-size
Specifies the initial heap size for java.exe (in megabytes). The default is 32 MB. If the specified value does not satisfy the following conditions, an invalid command line format results:
-
Integer in the range 1 to 2,048
-
Value specified in -mx >= value specified in -ms
input-file
Specifies the XML-format parameter file that is to be used to delete report definitions. This parameter file must be created according to the Parameter file format described below. You can specify the absolute file path name, relative file path name, or file name. When the name is not the absolute file path, the command assumes the current directory.
Parameter file format
XML tag specifications
-
report-definitions
Type
Description
Description
Root tag for report definition information
Specifiable value
None
Omissible
No
Attribute
None
Parent element
pr-cli-parameters
Child element
report-definition
-
report-definition
Type
Description
Description
Specifies a single report definition.
Specifiable value
None
Omissible
No
Attribute
name
Specify a report definition name with 1 to 64 double-byte and/or single-byte characters (rather than 1 to 64 bytes). If the report definition name contains \ or /, specify it as \\ or \/, respectively. If the name attribute is omitted, the command deletes the report definition directory specified in parent-folder and all its subdirectories. If spaces are specified before and/or after the report definition name, the name is registered without the leading and/or trailing spaces.
parent-folder
Specify the name of the directory that contains the report definition specified in the name attribute. The name that you specify is a slash (/) separated path from the root directory. The path can have 1 to 64 double-byte and/or single-byte characters (rather than 1 to 64 bytes). If the name attribute is omitted, the command deletes the report definition directory including its subdirectories. For a path, specify directories sequentially separated by / starting from the highest-level directory. If the directory name contains \ or /, specify it as \\ or \/, respectively. An error results if spaces are specified before and/or after the directory name. If this attribute is omitted, an error results.
For example, to output the report definition named PD define located under the User Reports root directory, specify as follows: <report-definition name="PD define" parent-folder="/"/>
The following example outputs to a file, all report definitions located in the Dir1 and Dir2 directories under the User Reports root directory:
<report-definition parent-folder="/Dir1/Dir2"/>
id
Ignored, if specified.
read-only
Specify TRUE to cancel deletion of the report definition and to process the next report definition. When you specify FALSE or you omit this attribute, the command deletes the report definition.
Parent element
report-definitions
Child element
product
Ignored, if specified.
report-type
record
indication-settings
view-type
drilldown
An example of a parameter file is shown below.
Example of parameter file
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pr-cli-parameters SYSTEM "rdef_delete_params.dtd"> <pr-cli-parameters ver="0100"> <report-definitions> <report-definition name="Workload Status (Multi-Agent)" parent-folder="/"/> <report-definition name="daily report" parent-folder="/UserReport" read-only="FALSE"/> <report-definition name="" parent-folder="/report1"/> </report-definitions> </pr-cli-parameters>
Notes
-
The command requires authentication for PFM - Manager during execution. If a key file for authentication has not been created prior to command execution, use the jpcmkkey command to create the key file for authentication.
-
The monitoring template report definitions and report definition directory cannot be deleted.
-
If a report definition directory or report definition specified as a deletion target does not exist, the command returns a value indicating successful deletion without returning an error.
-
When a report definition directory is specified as a deletion target, and deletion of one of the definitions in its subdirectories or deletion of one of the subdirectories fails, the command cancels processing of that report definition directory and processes the next report definition or report definition directory specified in the parameter file.
-
If multiple report definitions or report definition directories are specified as deletion targets and deletion of one of the definitions or directories results in an exception, the command cancels that processing and processes the next report definition or report definition directory specified in the parameter file.
-
Normally, you do not need to set the -mx or -ms option. If the KAVJK0401-E message, which reports insufficient memory, is output during command execution, re-execute the command with the -mx option to increase the maximum heap size. At this time, make sure that you specify 64 or a greater value for the -mx option.
-
When performing multiple monitoring, you cannot execute this command from the PFM - Web Console host that is connected to the secondary PFM - Manager host.
Return values
0 |
The command ended normally. |
1 |
The command line format is invalid. |
2 |
The user does not have execution permission for the command. |
3 |
Creation of the output file failed. |
5 |
The parameters cannot be analyzed because they do not match the DTD file. |
10 |
Creation of at least one report definition failed. |
11 |
Authentication processing for logging into PFM - Manager failed. |
12 |
An attempt was made to execute the command from the PFM - Web Console host that is connected to the secondary PFM - Manager host when multiple monitoring is performed. |
100 |
The environment is invalid. |
200 |
A memory error occurred. |
202 |
A file access error occurred. |
222 |
A communication processing error occurred. |
255 |
An unexpected error occurred. |
Usage example 1
This example deletes the report definitions specified in the parameter file rdef_del.xml:
jpcrdef delete -y rdef_del.xml
Usage example 2
This example deletes each report definition specified in the parameter file rdef_del02.xml after displaying a deletion confirmation message:
jpcrdef delete rdef_del02.xml
Output example
This example outputs the details of the command's processing to the standard output, standard error output, and trace log file. For details about the log specifications, see Chapter 4. Log Information Output by Performance Management.
An example is shown below of the standard output format when ten report definitions and five report definition directories were specified and three report definitions resulted in an error.
Example of standard output
jpcrdef delete connected to vserv01 at 2006 03 20 15:00:55.282 delete result OK : report-definition-directory-path-1/report-definition-name-11 delete result OK : report-definition-directory-path-2/report-definition-name-21 delete result ERR : report-definition-directory-path-3 Skipped : report-definition-directory-path-3/report-definition-name-31 Cause of error OK : report-definition-directory-path-3/report-definition-name-32 Skipped : report-definition-directory-path-3/report-definition-name-33 Cause of error OK : report-definition-directory-path-3/report-definition-name-34 OK : report-definition-directory-path-3/report-definition-name-35 delete result ERR : report-definition-directory-path-4/report-definition-name-41 Cause of error delete result OK : report-definition-directory-path-5 OK : report-definition-directory-path-5/report-definition-name-51 OK : report-definition-directory-path-5/report-definition-name-52 jpcrdef delete disconnected at 2006 03 20 15:01:06.2
In this example, report-definition-directory-path-3/report-definition-name-31 and report-definition-directory-path-3/report-definition-name-33 in report-definition-directory-path-3 and report-definition-directory-path-4/report-definition-name-41 were not deleted (they still remain).