PS Series Storage Arrays Host Scripting Tools You can use the host scripting tools to issue PS Series Group Manager command line interface (CLI) commands from a remote host and capture the output of the commands. This allows you to automate PS Series group administration tasks. The host scripting tools provide a Perl script, Perl modules, and sample scripts. The basic functionality provided in the Perl script is the ability to log in to a PS Series group and send and receive CLI commands. You can run the Perl script on a command line or from a shell script or batch file. The script can execute a single command or a list of commands from a file. The Perl modules enable you to use Perl as the scripting language to do more complicated operations. Installing Perl To use the host scripting tools, install Perl on the host system. On Windows platforms, obtain Perl from ActiveState (http://aspn.activestate.com/ASPN/Downloads/ActivePerl/) or as part of the cygwin distribution (http://www.cygwin.com). Obtaining the Perl Script, Modules, and Sample Scripts The Perl script, modules, and sample scripts are located on the CD-ROM that ships with a PS Series storage array: * EqlCliExec.pl Perl script. * EqlScript.pm Perl module. * samples Directory containing script samples. * Net Directory containing the Telnet.pm file. If you are using a Windows operating system, copy the previous files and directories from the tools/eqlscript/windows directory on the CD-ROM to your server. If you are using a UNIX-based operating system, copy the eqlscript_ux.tar file from the tools/eqlscript/unix directory on the CD-ROM to your server and then extract the files and directories. Note: Make sure the Net directory is located in the same directory as the Perl script and module. The files and directories are also available from the Technical Support website if you have a support account: support.dell.com/Equallogic Log in to a support account and then click Downloads. Using the Host Scripting Tools The Perl script, EqlCliExec.pl, can be run from a command line or as a stand-alone application for use in shell scripts, batch files, etc. The script uses the following format: EqlCliExec.pl [-?] -g group [-a account] [-p password] –f clifile | clicommand Parameters and variables are as follows: -? Displays script usage. -g group PS Series group IP address or name. -a account Group administration account (the default is the grpadmin account). -p password Account password. If no password is supplied, the script will prompt for one. -f clifile Full pathname for a file containing a sequence of one or more CLI commands. The file must contain one command per line. clicommand CLI command. It is recommended that you do not use the grpadmin account when running the Perl script from a remote host. Instead, use a different group administration account. Read-write access is required for most operations. The EqlCliExec.pl script will output the command results and set the return code to 0 (zero) if successful or 1 if an error occurs. If multiple CLI commands are issued, the script will stop processing if an error is encountered. See the CLI Reference manual for detailed descriptions of the CLI commands. Examples The following example executes the grpparams show command on a PS Series group, using the grpadmin account and password: > EqlCliExec.pl -g 192.12.4.122 -a admin –p xyz123 grpparams show The following example executes the CLI commands in the cmds.txt file. The raw output of all the commands is concatenated together: > EqlCliExec.pl -g 192.12.4.122 -a admin –p xyz123 -f cmds.txt Specifying a password on the EqlCliExec.pl script command line, as shown in the above examples, is not recommended for security reasons. If you do not specify a password, you will be prompted for one. As an alternative, you can pass a password to the script by using a command pipeline or a file containing the password. For example: > echo "password" | EqlCliExec.pl -g 192.12.4.122 -a admin grpparams show > EqlCliExec.pl -g 192.12.4.122 -a admin grpparams show < password_file.txt In DOS environments, do not surround the password with quotes and do not use a space between the password and the command pipe. For example: > echo password| EqlCliExec.pl -g 192.12.4.122 -a admin grpparams show PN: 0208