Adding a custom command – HP Storage Essentials NAS Manager Software User Manual
Page 291
Storage Essentials 5.00.01 User Guide 261
Adding a Custom Command
Use the custom command functionality in the software to run a command you created on the
management server. The command could point to an executable or a script. For example, assume
you have already created a script that backs up a storage system. You could run that script from
System Manager, as described in the following steps.
Keep in mind the following:
•
The custom command always runs on the management server unless you are running the telnet
utility. You can obtain information about the element on which you right-clicked by using the
software's environment variables. See the topic, ”
Software Environment Variables for Scripting
•
Run scripts at your own risk. The management server lets you run any script including those that
can disable the management server.
•
(Management Servers on Windows Only) If you leave the Remote Console (cmd /k) open after
running a script, users can traverse the directory structure of the management server.
•
If you want a Perl script to run as a custom command on Sun Solaris, you must prefix the script
name with the Perl executable, for example, perl myscript.pl, where myscript.pl is the
script you want to run. A best practice is to prefix the script name with the path to Perl and the
Perl executable, for example: perl/bin/perl myscript.pl, where perl/bin/ is the
directory containing the Perl executable, perl is the executable and myscript.pl is the
script you want to run.
•
If you want a Perl script to run as a custom command on Microsoft Windows, you must prefix the
script name with the complete path to perl. The management server already has a directory
containing the perl executable inside the folder,
%JBOSS4_DIST%\server\appiq\remoteScripts\perl\bin. You would prefix the
script name as follows:
.\perl\bin\perl myscript.pl
where .\perl\bin\ is the directory containing the Perl executable in the RemoteScripts
directory, perl is the executable and myscript.pl is the script you want to run.
To add a custom command:
1.
Right-click an element in System Manager.
2.
Select Custom Commands > Set Up Custom Commands from the drop-down menu. HP
comment.
3.
(Optional) If you plan to use a command to activate a file, such as a script, the file must be
uploaded to the management server, as described below:
a. In the Custom Command Setup window, click the Browse button to find the file containing
the custom command.
b. Click the Open button, then click the Upload to server button.
The file is saved on the management server.
4.
Click the Add Command button in the upper-right corner of the window.
5.
In the Add Custom Command window, type a name for the command in the Name field, for
example, backup command.
- Storage Essentials Provisioning Manager Software Storage Essentials Backup Manager Software Storage Essentials Chargeback Manager Software Storage Essentials Report Designer Software Storage Essentials Global Reporter Software Storage Essentials Enterprise Edition Software Storage Essentials Exchange Viewer Software Storage Essentials File System Viewer Software