jpctool service delete
- Organization of this page
Format
jpctool service delete -id service-ID [-host host-name] [-lhost logical-host-name] [-force]
Function
The jpctool service delete command deletes the service information for an agent registered in Performance Management. You use this command to delete the service information for a product that has been uninstalled.
- Note
-
The service information for the Name Server, Master Manager, Master Store, and Status Server cannot be deleted.
Hosts that can execute the command
PFM - Manager
Execution permission
- In Windows:
-
-
User with Administrators permissions
-
User with Backup Operators permission
-
- In UNIX:
-
User with root user permissions
Installation directory
- In Windows:
installation-folder\tools\
- In UNIX:
/opt/jp1pc/tools/
Arguments
-id service-ID
Specifies the service ID of the service information to be deleted. For service-ID, specify a string of 1 to 258 bytes. You can use a wildcard character to specify multiple service IDs. In this case, processing of the remaining services continues even if an error occurs on one service. If errors occur on multiple services, the command returns a value for the last error that occurred.
-host host-name
Specifies a host name if service information is to be deleted from a specific host. For host-name, specify a strong of 1 to 32 bytes, consisting of alphanumeric characters with no space characters. If you omit this option, the local host is assumed.
You can use a wildcard character to specify multiple host names.
-lhost logical-host-name
Specifies a logical host name if this command is to be executed by a host in a logical host environment, not in the physical host environment. For logical-host-name, specify a string of 1 to 32 bytes, consisting of alphanumeric characters with no space characters. If you omit this specification, the physical host is assumed. Wildcard characters cannot be used.
-force
When this option is specified, service information is forcibly deleted, regardless of whether the service specified by the service ID is running.
Notes
-
Arguments must be specified in the order that they appear in the description. Otherwise, they will not be recognized correctly.
-
When this command is executed, communication is established from the PFM - Manager host to the PFM - Agent or PFM - RM host to check the startup status of the PFM - Agent or PFM - RM. If communication cannot be established for a physical reason, such as a LAN cable not connected at the PFM - Agent host or PFM - RM host, the command cannot delete the agent's service information. When executing this command, make sure that the PFM - Manager host and the PFM - Agent or PFM - RM host are physically connected. By executing this command with the -force option specified, you can forcibly delete service information.
-
If the Name Server and Master Manager services are not running, service information cannot be deleted. Also, if the specified service is engaged in startup processing, its service information cannot be deleted.
-
When the service information synchronized by the jpctool service sync command is applied varies depending on the version of PFM - Web Console. For details about the jpctool service sync command, see jpctool service sync.
-
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 an Action Handler service is deleted, action execution is disabled for the alarms that use that Action Handler service.
-
After executing this command, an unnecessary agent remains under the User Agents node in the Agents tree in PFM - Web Console. If you do not want that agent to be displayed, delete it manually.
Return values
0 |
The command terminated normally. |
1 |
An argument specification is invalid. |
2 |
The user does not have execution permission for the command. |
3 |
The specified service has not been registered. |
4 |
The specified service has not been stopped. |
5 |
PFM - Manager has not been installed. |
7 |
The specified service ID belongs to the Name Server, Master Manager, Master Store, or Status Server service. |
100 |
The Performance Management environment is invalid. |
101 |
Either Name Server service or Master Manager service is not active. |
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. |
222 |
A communication error occurred. |
255 |
An unexpected error occurred. |
Usage example 1
This command deletes service information after PFM - Agent for Platform (Windows) has been uninstalled at the host02 host:
jpctool service delete -id T* -host host02
Usage example 2
This example deletes the service information for PFM - Agent for Platform (UNIX) at the host03 host. The command assumes that the PFM - Manager to which PFM - Agent for Platform (UNIX) belongs is in a logical host environment (host01):
jpctool service delete -id "U*" -host host03 -lhost host01
Usage example 3
This example deletes the service information for all the agents on the jp1-ha1 logical host when PFM - Agent or PFM - RM is in a logical host environment (host name: jp1-ha1) and PFM - Manager is on the physical host:
jpctool service delete -id "?S*" -host jp1-ha1 jpctool service delete -id "?A*" -host jp1-ha1
Usage example 4
This example deletes the service information for all the agents on the jp1-ha1 logical host when PFM - Agent or PFM - RM is on a logical host (host name: jp1-ha1) and PFM - Manager is on a logical host (host name: jp1-ha2):
jpctool service delete -id "?S*" -host jp1-ha1 -lhost jp1-ha2 jpctool service delete -id "?A*" -host jp1-ha1 -lhost jp1-ha2