1.6.8 listservices (outputting the list of services or service templates)
Description
This command outputs the CSV-formatted list of the services or service templates registered in JP1/AO.
You can output the list of the services, including the vendor name and version number, or of the service templates. Note that debug services are not output.
Syntax
listservices /output {services | servicetemplates} /file output-file-path [/encoding {UTF-8 | Shift_JIS}] /user user-ID {/password password | /passwordfile password-file-path}
Arguments
- /output {services | servicetemplates}
This option specifies which information is output in the list.
services
Outputs the list of services.
servicetemplates
Outputs the list of service templates.
- /file output-file-path
This option specifies the absolute or relative path to the output file. An error occurs if the specified file exists.
- /encoding {UTF-8 | Shift_JIS}
This option specifies the encoding of the output file. If this option is omitted, the default encoding of the OS is used.
- /user user-ID
This option specifies the user ID for JP1/AO.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are half-width alphanumeric characters, !, #, $, %, &, ', (, ), *, +, -, ., =, @, \, ^, _, and |.
This option is not case sensitive.
- /password password
This option specifies the password of the user indicated by the user option.
You must specify either this option or the passwordfile option. If both options are specified, or if neither are specified, then you will get an error.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are the same as those for the user option.
- /passwordfile password-file-path
This option specifies the absolute or relative path to the password file for the user specified in the user option. You can create a password file by using the encryptpassword command.
You must specify either this option or the password option. If both options are specified, or if neither are specified, then you will get an error.
Output format
The output items are output in CSV format in a single line per service or service template.
The values for each output item are enclosed in double quotation marks ("). Any double quotation mark (") contained in the value is escaped with another one added in front of the mark.
Type of output information |
Output item |
Content |
---|---|---|
List of services |
Name |
Service name |
Favorite |
Favorite-setting state |
|
Description |
Description |
|
Service Group |
Service group name |
|
Service Template |
Service template name |
|
Vendor Name |
Vendor name |
|
Version |
Service version |
|
Tags |
Tags set for the service |
|
Status |
Status |
|
Create Date |
Creation date and time |
|
Modify Date |
Date and time of the last modification |
|
Submit Date |
Date and time of the last submission |
|
Reset Date |
Reset date and time |
|
Executed Count |
Number of task executions |
|
Completed Count |
Number of successful terminations |
|
Last Failed Date |
Date and time of the last failure |
|
Failed Count |
Number of failed attempts |
|
Submit Count |
Number of service executions |
|
ID |
Service ID |
|
Latest |
Whether the service template is the latest version |
|
Supported Schedule Type |
Selectable schedule types |
|
Supported Action Type |
Operations that can be performed for the task |
|
List of service templates |
Name |
Service template name |
Vendor |
Vendor name |
|
Version |
Service template version |
|
Description |
Description |
|
Service Template Key Name |
Service template ID |
|
Vendor ID |
Vendor ID |
|
Tags |
Tags set for the service template |
|
Registered |
Creation time |
|
Updated |
Time of the last update |
|
Latest Version |
Whether the service template is the latest version |
|
Used Services |
Number of services that use the service template |
|
Used Service Templates |
Number of service templates that use this service template as a component |
|
Outdated Services |
Whether any services are using an outdated version of the service template |
|
Outdated Component |
Whether an outdated component is being used |
|
Supported Schedule Type |
Selectable schedule types |
|
Supported Action Type |
Operations that can be performed for tasks that use this service template |
|
Release State |
Release state |
The following list shows some examples of file outputs.
For the list of services
"Name","Favorite","Description","Service Group","Service Template","Vendor Name","Version","Tags","Status","Create Date","Modify Date","Submit Date","Reset Date" ,"Executed Count","Completed Count","Last Failed Date","Failed Count","Submit Count","ID","Latest","Supported Schedule Type","Supported Action Type" "Remote Command Execution","false","The service executes the commands on the remote target server.","DefaultServiceGroup","Remote command execution","Hitachi, Ltd","01.12.00","Basic,OS_Operations" ,"Release","2015-08-28 13:07:25","2015-08-28 13:07:25","2015-08-28 13:20:26","","3","1","2015-08-28 13:17:58","2","3","4005","Yes","immediate,schedule,recurrence","forciblyStop,retry"
For the list of service templates
"Name","Vendor","Version","Description","Service Template Key Name","Vendor ID","Tags","Registered","Updated","Latest Version","Used Services","Used Service Templates","Outdated Services","Outdated Component","Supported Schedule Type","Release State","Supported Action Type" "Get List of Users from Server","Hitachi,Ltd.","02.00.00","Acquires a list of Windows or UNIX OS users.","osShowUsers","com.hitachi.software.dna.cts.jp1","AIX,Gather OS information,Linux,Windows","2016-11-17 13:41:21","2016-11-17 13:41:21","Yes","0","0","No","No","immediate,schedule,recurrence","Release","forciblyStop,retry"
Located in
- In Windows:
JP1/AO-installation-folder\bin
- In Linux:
/opt/jp1ao/bin
Execute permission
Execute the command as a user with Administrator permissions for the OS.
To output a list of services, the Admin, Develop, Modify, or Submit role must be set for the target service groups from the user group that the user who executes the command belongs to. The command does not output a list of services for any service groups for which none of these roles are set.
To output a list of service templates, the Admin, Develop, or Modify role must be set for the target service groups from the user group that the user who executes the command belongs to.
Return code
The following table lists the return codes from the command.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
The argument is invalid. |
2 |
The command execution has been interrupted. |
3 |
The service status is invalid. |
4 |
One of the other commands is running. |
5 |
Communication failed. |
6 |
Authentication failed. |
7 |
An invalid path is specified. |
8 |
The file with the same name already exists in the output path. |
9 |
The specified path does not exist. |
10 |
The specified path is not accessible. |
12 |
An invalid encoding is specified. |
13 |
Outputting the file failed. |
14 |
You do not have permission to execute the command. |
160 |
Obtaining the list of services failed. |
161 |
Obtaining the list of service templates failed. |
255 |
The command execution has been interrupted due to an error other than the above. |
Example
The following examples show how to use the command for each case.
To output, in Windows, the list of registered services to a file in default encoding of the OS:
listservices /output services /file list01 /user user01 /password pass01
To output, in Windows, the list of registered service templates to a file in UTF-8 encoding:
listservices /output servicetemplates /file list02 /encoding UTF-8 /user user02 /password pass02