beautypg.com

Setting up custom commands, About custom commands – HP Storage Essentials NAS Manager Software User Manual

Page 290

background image

Viewing Element Topology and Properties

260

Setting Up Custom Commands

This section describes the following:

About Custom Commands

” on page 259

Adding a Custom Command

” on page 259

Editing a Custom Command

” on page 262

Deleting a Custom Command

” on page 262

Software Environment Variables for Scripting

” on page 262

Using the Remote Console

” on page 266

About Custom Commands

Custom commands let you run a command you created on the management server. The command

could point to an executable or a script that does not use the graphical user interface. For example,

assume you have already created a script that backs up a storage system. You could run that script

from System Manager.
You can also use environment variables in your scripts. For example, you could use the variables to

obtain information about a host, such as its total physical memory and the number of processors.
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

Software Environment Variables for Scripting

” on

page 262.

Run scripts at your own risk. The management server lets you run any script including those that

can disable the management server.

Custom commands only supports executables and scripts that do not use the graphical user

interface.

(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

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 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.