Tony,
Here's some perl code that get's a robot's inventory:
print "Scanning media in robot $robot{$media_host}\n";
@slotcontents = `$vmpath/vmcheckxxx -rt $robot_type -rn
$robot{$media_host} -list -rh $robothost{$media_host}`;
foreach $slotcontents (@slotcontents) {
next if ($slotcontents !~ /Yes/);
# problem with whitespace in 1-99 slots; using special split form
($slot,$rfield,$barcode) = split " ",$slotcontents, 3;
$slot=~ s/^\s+//;
$slot=~ s/\s+$//;
$barcode=~ s/^\s+//;
$barcode=~ s/\s+$//;
chomp($slot);
chomp($barcode);
##print "slot: |$slot| barcode: |$barcode|\n";
$HoL{$barcode} = [ $slot ];
}
On Fri, 9 Feb 2001 anthony.guzzi AT storability DOT com wrote:
> I recently put in a request to Veritas tech support for help identifying a
> command I could use in a script to get a robot inventory. I want to
> implement a "sanity check" routine that will compare what the robot knows
> is in it and where it is with what NetBackup thinks is in the robot and
> where it is; I then want to be able to send an SNMP trap on any found
> differences (our servers have ENE installed on them so I'll be using the
> facilities it provides to send the traps).
>
> On Monday a VRTS tech pointed me to the 'vmcheckxxx' command but his sole
> help from that point on was to do a 'vmcheckxxx -help' for a usage
> statement. I understood most of the arguments ( -rh, -rn, -rt, -vh, -M)
> but some are still a mystery to me (-b, -if, and the difference between
> -recommend and -recommendcmd). I sent him a follow-up e-mail Monday
> asking for an explanation of the args. I've yet to hear back from him.
> Since 'vmcheckxxx' appears to be an undocumented command, I'm wondering if
> that's why he hasn't responded.
>
> I'd appreciate any insight to the meaning and purpose of 'vmcheckxxx's
> arguments. Points to existing scripts that can do this "sanity check"
> would also be appreciated.
>
> -- Tony Guzzi
> Assured Restore engineering team
> (877) 902-8628
|