jpcconf acc setup
- Organization of this page
-
Format
Format 1
jpcconf acc setup -type {pfmhost|wmi|ssh} [-lhost logical-host-name] [-input definition-file-name] [-noquery]
Format 2
jpcconf acc setup -type {pfmhost|wmi|ssh} -template definition-file-name [-noquery]
Function
Format 1
Newly creates and updates the specified common account information.
Format 2
By specifying the -template option, a template file that contains all labels to be set in the common account information also can be output.
Hosts that can execute the command
-
PFM - Manager
-
PFM - Agent
-
PFM - Base
-
PFM - RM
Execution permission
- In Windows:
-
User with Administrators permissions (executed from the administrator console when Windows UAC functionality is enabled)
- In UNIX:
-
User with root user permissions (A user whose uid is 0.)
Installation directory
- In Windows:
-
installation-folder\tools\
- In UNIX:
-
/opt/jp1pc/tools/
Arguments
-type {pfmhost|wmi|ssh}
Specifies the type of the common account information to be created. The following table shows details of each type.
Common account information type |
Description |
---|---|
pfmhost |
Common account information for instance environments (for each PFM - RM host) |
wmi |
Common account information for monitoring targets (for remote connection via WMI) |
ssh |
Common account information for monitoring targets (for remote connection via SSH) |
-lhost logical-host-name
Specifies the logical host name of the host on which this command is to be executed. For logical-host-name, specify a string of 1 to 32 bytes, consisting of single-byte alphanumeric characters. If you omit this option, the command assumes that the physical host is specified.
This option cannot be specified with the -template option (in Format 2).
-input definition-file-name
Specify this option to read the values to be set in the common account information from a definition file. For definition-file-name, specify a string of 1 to 250 bytes. The common account information is automatically created or updated by using the values in the specified definition file.
If you specify a string that contains spaces or parentheses (( )) for this option, enclose the entire string in double quotation marks (").
If you omit this option, the command runs in interactive mode.
-noquery
If this option is specified, the command does not output any query messages that interrupt command execution, making it unnecessary for the user to respond. Specify this option if you want the command to run in non-interactive mode. Note that the behaviors while the command is running are as follows:
-
If the common account information has been already configured:
A KAVE05478-I message is output and the settings of the common account information are updated.
-
If the file with the same name as that of the file specified for the -template option already exists:
A KAVE05399-I message is output and the file is updated.
-template definition-file-name
Specify this option to output the definition file template. For definition-file-name, specify a string of 1 to 245 bytes. The definition file consisting of the sections and labels that correspond to the type of the target common account information is output. Note that the labels of the [Account Definitions] section remain blank.
You can edit the output definition file according to environment requirements, and can specify the edited definition file as an input file for the -input option.
If you specify a string that contains spaces or parentheses (( )) for this option, enclose the entire string in double quotation marks (").
Format of the definition file (pfmhost and wmi)
The definition file is a text file consisting of the sections and labels below. The label names and values are specified in name=value format. The format of the definition file differs depending on the type of the common account information. The following shows the definition file format for pfmhost and wmi:
- [Common Definitions] section
-
Specifies the basic information in the definition file.
- Definition Type label
-
Specifies the type of the common account information. Specify pfmhost if the type of the common account information is pfmhost. Specify wmi if the type of the common account information is wmi.
- [Account Definitions] section
-
Specifies the values to be set in the common account information.
- User label
-
Specify the user name as a string of 1 to 256 bytes, consisting of single-byte alphabetic characters with no tab characters. You cannot omit this label.
- Password label
-
Specify the password as a string of 1 to 256 bytes, consisting of single-byte alphabetic characters with no tab characters. You cannot omit this label.
- Domain label
-
Specify the domain name as a string of 0 to 256 bytes, consisting of single-byte alphabetic characters with no tab characters. You can omit this label.
Example of specifying settings in a definition file for pfmhost:
[Common Definitions] Definition Type=pfmhost [Account Definitions] User=Administrator Password=aaa Domain=bbb
Example of specifying settings in a definition file for wmi:
[Common Definitions] Definition Type=wmi [Account Definitions] User=Administrator Password=aaa Domain=bbb
Format of the definition file (ssh)
The definition file is a text file consisting of the sections and labels below. The label names and values are specified in name=value format.
- [Common Definitions] section
-
Specifies the basic information in the definition file.
- Definition Type label
-
Specifies the type of the common account information. Specify ssh if the type of the common account information is ssh.
- [Account Definitions] section
-
Specifies the values to be set in the common account information.
- User label
-
Specify the user name as a string of 1 to 256 bytes, consisting of single-byte alphabetic characters with no tab characters. You cannot omit this label.
- Private_Key_File label
-
Specify the name of the private key file to be used in the SSH public key method with the absolute path. Specify a string of 1 to 256 bytes, consisting of single-byte alphabetic characters.
Even if you specify a string that contains spaces, you do not need to enclose the entire string in double quotation marks ("). However, tab characters cannot be specified.
Note that you cannot omit this label.
Example of specifying settings in a definition file for ssh:
[Common Definitions] Definition Type=ssh [Account Definitions] User=root Private_Key_File=/opt/jp1pc/agt7/.ssh/agt7
Notes
-
The versions of PFM - RM for Platform and the version of a required program (PFM - Manager or PFM - Base) on the same PFM - RM for Platform device must be 10-50 or later.
-
If the definition file includes confidential information such as passwords, save the file in a secure and safe place, and delete the file when the file is no longer needed. If you need to transfer the definition file between hosts, we recommend that you use SFTP communications (FTP communications through an SSH tunnel) or other safe means that are secure against sniffing.
-
This command cannot run concurrently with a startup or termination command, or other setup command, on the same host.
-
If command execution is interrupted by pressing the Ctrl + C keys or by a signal, a predefined return value is not returned. Therefore, you should ignore the return value when the command was interrupted by the Ctrl + C keys or by a signal.
-
If the common account information is updated while the Remote Monitor Collector service is running, the update timing of the common account information differs depending on the type of the common account information.
-
To apply the updated common account information for pfmhost to instance environments, you need to restart the Remote Monitor Collector service.
-
The updated common account information for wmi or ssh is applied during the first processing to collect the performance information after the common account information was updated. Therefore, you do not need to restart the Remote Monitor Collector service.
-
-
When you execute the command with the -input option specified, the command execution is interrupted if the definition file does not contain necessary labels or if invalid values are specified for necessary labels. If you specify the -noquery option to automatically execute the command in a batch or a script file, verify that the settings in the definition file are correct beforehand. Check the output message or return value to confirm that the command execution was complete normally.
-
In a logical host environment, the command in Format 1 cannot run on the standby logical host.
-
If ssh is specified for the -type option, the command checks whether the file specified for the Private_Key_File label exists. If the file is not found, a KAVE05489-W message is output and the command continues the subsequent processing.
Return values
0 |
The command terminated normally. |
1 |
An argument specification is invalid. |
2 |
The user does not have execution permission for the command. |
6 |
The definition file contains errors. |
10 |
The command is now running. |
11 |
The user canceled the processing. |
26 |
An incorrect value might be specified.# |
100 |
The Performance Management environment is invalid. |
102 |
The specified logical host name has not been set up. |
200 |
A memory shortage occurred. |
210 |
A disk space shortage occurred. |
211 |
A file or directory cannot be accessed. |
230 |
Execution of an internal command failed. |
255 |
An unexpected error occurred. |
- #
-
This value is returned when the specified file is not found.
Usage example 1
This example specifies the definition file to be read for the -input option and creates or updates the common account information in interactive mode. In this example, pfmhostTemplate.txt is read as the input file. The values in pfmhostTemplate.txt are displayed as the values of User, Password, and Domain. The values entered for Password and Re-enter are not displayed.
jpcconf acc setup -type pfmhost -input pfmhostTemplate.txt KAVE05477-Q The common account information is already configured (type=pfmhost). Do you want to update it? (Y/N) Y User : Administrator Password : Re-enter : Domain [] : bbb KAVE05473-I The common account information was configured successfully. (type=pfmhost)
Usage example 2
This example outputs the template specified for the -template option, in interactive mode. In this example, the template file pfmhostTemplate.txt is output.
jpcconf acc setup -type pfmhost -template pfmhostTemplate.txt KAVE05146-Q The file already exists. Do you want to update the file? (Y/N) Y KAVE05481-I The input definition file template was exported successfully. (type=pfmhost)
Usage example 3
This example creates the common account information for pfmhost, in interactive mode. The values entered for Password and Re-enter are not displayed.
jpcconf acc setup -type pfmhost User : Administrator Password : Re-enter : Domain [] : bbb KAVE05473-I The common account information was configured successfully. (type=pfmhost)
Usage example 4
This example updates the common account information for pfmhost, in interactive mode. The values entered for Password and Re-enter are not displayed.
jpcconf acc setup -type pfmhost KAVE05477-Q The common account information is already configured (type=pfmhost). Do you want to update it? (Y/N) Y User [Administrator] : Password : Re-enter : Domain [bbb] : KAVE05473-I The common account information was configured successfully. (type=pfmhost)
Usage example 5
This example reads the definition file pfmhostTemplate.txt specified for the -input option and creates the common account information. Because the -noquery option is specified in this example, if the definition file with the same file name already exists, the common account information is automatically updated.
jpcconf acc setup -type pfmhost -input pfmhostTemplate.txt -noquery KAVE05478-I The common account information is being updated. (type=pfmhost) User : Administrator Password : Re-enter : Domain [] : bbb KAVE05473-I The common account information was configured successfully. (type=pfmhost)
Usage example 6
This example outputs the template file pfmhostTemplate.txt specified for the -template option. Because the -noquery option is specified in this example, if the template file with the same file name already exists, the existing template file is automatically updated.
jpcconf acc setup -type pfmhost -template pfmhostTemplate.txt -noquery KAVE05399-I The existing file will be updated. (file=C:\Program Files\Hitachi\jp1pc\tools\pfmhostTemplate.txt) KAVE05481-I The input definition file template was exported successfully. (type=pfmhost)