HP XP20000/XP24000 Administrator's Manual page 12

Hp storageworks p9000 virtualization adapter administrator guide (5697-0680, october 2010)
Hide thumbs Also See for XP20000/XP24000:
Table of Contents

Advertisement

command.pl example
#!/usr/bin/perl
use Net::Telnet;
my @stdinput = <STDIN>;
my $input;
my $output;
my $out;
my $host;
my $user;
my $pass;
my $local = 1;
my $cmd;
:
:
:
my $telnet = Net::Telnet->new(Host=>$host,Cmd_remove_mode=>1,Timeout=>180);
$telnet->login($user,$pass);
if ($ENV{'HORCMROOT'} ne "")
{
$cmd = "echo \"" . $input . "\" | " . $ENV{'HORCMROOT'} . "\\HORCM\\etc\\rmsra -auto timeout=" .
$ENV{RMSRATOV} . " testMU=" . $ENV{'RMSRATMU'} . " -XMLSTDOUT";
}
else
{
$cmd = "rm -f " . $txtname;
$telnet->cmd($cmd);
foreach my $line (@input)
{
$cmd = "echo \'" . $line . "\' >> " . $txtname;
$telnet->cmd($cmd);
}
$cmd = "cat " . $txtname . " | /HORCM/usr/bin/rmsra -auto timeout=" . $ENV{'RMSRATOV'} . "
testMU=" . $ENV{'RMSRATMU'} . " -XMLSTDOUT >" . $xmlname . " 2>" . $logname;
}
$telnet->cmd($cmd);
$cmd = "cat " . $logname . " >> " . $xmlname;
$telnet->cmd($cmd);
$cmd = "cat " . $xmlname;
my (@stdout, @stderr, $exit) = $telnet->cmd($cmd);
foreach my $line (@stdout)
{
if ($line =~ /^\s*<|wwn=/)
{
$output = $output . $line;
}
elsif ($line =~ /^\[RMSRA\]/)
{
print $line;
}
}
$out = "> " . $out;
open(OUT,$out);
print OUT $output;
close(OUT);
exit($exit/256);
12
Overview of the P9000 Virtualization Adapter

Advertisement

Table of Contents
loading

This manual is also suitable for:

Storageworks p9000

Table of Contents