jcacancel
- Organization of this page
Function
This command cancels automated actions. It is used to delete from JP1/IM - Manager the following actions that are no longer needed for system operation:
-
Actions that remain in the queuing state without being executed because many automated actions have been performed during system operation
-
Actions that remain in the running state because a command that needs time to be processed or processing of which does not end has been executed
The command executed for an action can be deleted by the jcocmddel command, but the status of the action does not change to canceled. Use the jcocmddel command to delete an action that cannot be canceled by using the jcacancel command.
For details about the jcocmddel command, see the chapters related to commands in the JP1/Base User's Guide.
The action status after cancellation depends on the action status before cancellation. The following table lists and describes the action statuses that can be canceled and the action statuses after cancellation.
Status of action that can be canceled |
Action status after cancellation#1 |
---|---|
Wait or Wait (Miss) |
Cancel |
Send (Miss)#2 |
|
Queue or Queue (Miss) |
|
Running or Running (Miss) |
Kill |
Format
jcacancel [-h logical-host-name] {[-i action-serial-number,...] | [-a] | [-s action-executing-host-name]} [-f]
Execution permission
In Windows: Administrator permissions (if the Windows UAC feature is enabled, the command is executed from the administrator console)
In UNIX: Superuser permissions
Storage directory
- In Windows:
-
Console-path\bin\
- In UNIX:
-
/opt/jp1cons/bin/
Arguments
- -h logical-host-name
-
When you are operating in a cluster system, this option specifies the logical host name. The command cancels automated actions that correspond to the specified logical host. If this option is omitted, the logical host name specified in the JP1_HOSTNAME environment variable is assumed. If the JP1_HOSTNAME environment variable is not specified, the physical host name is assumed. If you are not using a cluster system, specification of this option is not needed.
- -i action-serial-number
-
Specifies an automated action that is to be canceled.
You can determine the action serial numbers by using the jcashowa command or by displaying the List of Action Results window and the Action Log Details window in JP1/IM - View. You can specify a maximum of 20 action serial numbers. If you specify multiple action serial numbers, separate them with the comma (,). No other options can be specified between action serial numbers.
If you specify multiple action serial numbers and an error occurs on one action serial number during execution, processing continues. As many error messages are displayed as there are errors.
If you specify multiple action serial numbers in the -i option (in order to cancel multiple actions) and then multiple errors occur, the return value of the jcacancel command is for the last error that occurred.
- -a
-
Specifies that all automated actions that are to be executed from the JP1/IM where jcacancel is executed and that exist on all monitored hosts are to be canceled.
If you specify the -a option to cancel multiple actions and multiple errors occur, the return value of the jcacancel command is for the last error that occurred.
- -s action-executing-host-name
-
Specifies a host name when the automated actions that are to be canceled are the automatic actions executed from the JP1/IM where jcacancel is executed and that exist on the specified action executing host.
You can specify only a host that has been set as a managed host in the system configuration definition. Neither an IP address nor a host group can be specified.
If you specify the -s option to cancel multiple actions and multiple errors occur, the return value of the jcacancel command is for the last error that occurred.
- -f
-
Specifies that the automated actions are to be canceled without displaying a configuration message during cancellation processing.
Notes
-
Processing if the target host is restarted during cancellation processing
If the target host where automated actions are to be executed is restarted during automated action cancellation processing, the cancellation status of actions cannot be acquired. Therefore, the action status remains as Wait (Canceling), Send (Canceling), Queue (Canceling), or Running (Canceling), making it impossible to determine whether cancellation processing was successful. Use the jcocmdshow command to check the results. If there are any remaining actions, delete them with the jcocmddel command.
Return values
0 |
Normal termination |
1 |
Invalid argument error |
2 |
Invalid common definition error |
3 |
Invalid action status error |
4 |
Cancellation processing error |
5 |
Input/output error |
6 |
There was no response from the automated action function (Automatic Action Service) |
7 |
Execution permission error (Windows only) |
255 |
System error |
Example 1
Cancel multiple automated actions (action serial numbers 23, 35, and 42):
jcacancel -i 23,35,42
Example 2
Cancel all automated actions that are executed from the hostA logical host and that exist on all hosts that are monitored by the hostA logical host:
jcacancel -h hostA -a
Example 3
Cancel the automated actions that are executed from the JP1/IM that executes jcacancel and that exist on the host01 host:
jcacancel -s host01
Example 4
Cancel the automated actions that are executed from the hostB logical host and that exist on host02, which is monitored by the hostB logical host:
jcacancel -h hostB -s host02
Example 5
Cancel the automated actions that are monitored by the hostC logical host and that have specified action serial numbers (23, 35, and 42):
jcacancel -h hostC -i 23,35,42