6.4.3 Procedure for setting commands
Set the command that is appropriate for the operating system on the operation target host (Windows or Linux). When creating a plug-in that is compatible with multiple operating systems, set a command for each operating system.
The commands you set must be scripts or commands that are present on and executable by the operation target device.
The commands executed in plug-ins can have return values in the range from 0 to 63.
Plug-ins and service templates must be designed in such a way that standard output and standard error output produce less than 100 KB of data. When the standard output or standard error output of a plug-in exceeds 100 KB, the command is immediately killed and the plug-in terminates with an error. In this scenario, the results of execution of the command cannot be guaranteed.
- Important
-
Interactive commands and script that seek user input and commands that do not end automatically using a GUI display or the like cannot be executed.
If you connect to the execution target server with protocol SSH and the general command plug-in outputs KNAE08107-E and fails, the command that the specified in a general command plug-in may clear the standard input. In that case, identify the command that is clearing the standard input and prevent clearing the standard input. An example of how to prevent clearing of standard input is to specify < /dev/null in the command.
To set a command:
-
Click the Remote Command tab in the Create Custom Plug-in or Edit Custom Plug-in dialog box.
In the Execution Method area of the Platform, click CLI Command.
Enter the command line in CLI Command, and then click the Save button.
Figure 6‒10: Platform (when CLI Command is selected for the execution method)