HP Insight Control for Linux 6.2 User Guide

managed systems. This Insight Control for Linux tool captures Stdout and Stderr from the script,
captures the return code from the script, and closes the SSH connection.
The Run Script... task feeds the command lines in the script to an SSH instance on the target
system. The script is a series of command lines to be run on the target system using SSH.
The Linux script you run must be located in the Insight Control for Linux repository in the /opt/
repository/script directory.
You must ensure that the Linux script does not leave any open file descriptors upon completion
(including scripts you might have called). Open file descriptors can prevent the SSH connection
from closing properly, which might cause the task to remain in a Running state indefinitely.
To run a Linux script on one or more managed systems remotely, follow these steps:
1. Select the following menu item from the HP Insight Control user interface:
ToolsCommand Line ToolsRun Script...
2. Do one of the following to select and verify that the server in the target list is the server from
which you want to capture its Linux image:
Select Next> if the server or servers in the target list are correct.
Select Add Targets... or Remove Target to modify the list if the list is incorrect.
3. Select Apply when the list is correct.
4. Select Next.
5. Select the Linux script you want to run.
6. Select Next.
7. Select Run Now to run the Linux script immediately. Or, select Schedule to schedule the
task to occur in the future
8. Select the following menu item from the HP Insight Control user interface to view the task
results:
Tasks & LogsView Task Results...
From the Task Results page, you can view the log for the script, which includes Stdout and
Stderr from the script.
The return code from the script controls the final state of this task for a given target server.
If the return code from the script indicates failure, the task is shown with a Failed state.
If the return code from the script indicates success, the task is in a Complete state.
154 Using SSH for remote server management