Veritas-bu

[Veritas-bu] Command via bpcd

2006-05-09 10:51:22
Subject: [Veritas-bu] Command via bpcd
From: austin.murphy AT gmail DOT com (Austin Murphy)
Date: Tue, 9 May 2006 10:51:22 -0400
Thanks Mark, that was just what I needed.

Austin

For anyone who is interested...
Here is a little scriptlet to check all your tape drives and add up
the hours on each one.
Just put the NetBackup names of your SSO media servers in the script.


#!/usr/bin/perl
#
#  Check Tape Drives for mount time since last cleaning
#       compile results from all media servers
#
#   usage:  ./check_tape_drives.pl
#
use strict;

my @nbmediaservs = ( "NBserv1", " NBserv2", "NBserv3" );
my %cleaninfo;
my @drvlines;
my %drvhours;
my $checkcmd = "/usr/openv/volmgr/bin/vmoprcmd -h ";

foreach my $svr ( @nbmediaservs ) {
  $cleaninfo{$svr} = `$checkcmd $svr -clean -L`;
  $cleaninfo{$svr} =~ s/^Drive.*\*\*\*\n//s;
  @drvlines = split(/\n/, $cleaninfo{$svr});
  foreach ( @drvlines ) {
    /\s*(\S*)\s*(\S*)\s*(\S*).*$/;
    $drvhours{$1} += $3;
  }
}

print "Hours Mounted per Tape Drive \n";
print "---------------------------- \n";
foreach ( keys %drvhours ) { printf("%8s - %6.1f \n", $_, $drvhours{$_}); }




On 5/8/06, Mark.Donaldson AT cexp DOT com <Mark.Donaldson AT cexp DOT com> 
wrote:
> vmoprcmd has a lot of drive commands for remote servers.
>
> Run "vmoprcmd -Q" for the list.
>
> The "clean" commands are:
>
>   -cleanlist
>       Display drive cleaning information.
>   -clean
>       Send media configuration commands to tpclean.  This option is used
>       by java.
>
> Use "-h" to specify the media server and follow "-clean" by the same
> command-line things you'd feed to tpclean.
>
> -M
>
> -----Original Message-----
> From: veritas-bu-admin AT mailman.eng.auburn DOT edu
> [mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Austin
> Murphy
> Sent: Monday, May 08, 2006 1:09 PM
> To: veritas-bu
> Subject: [Veritas-bu] Command via bpcd
>
> Does anyone know if it is possible to remotely run a command through
> BPCD ?
>
> I am interested in running "tpclean -L" on a SAN Media Server's SSO tape
> drive from the master server in a script.
>
> Austin


<Prev in Thread] Current Thread [Next in Thread>