Technical Services

Symantec NetBackup

Symantec Storage Foundation
(latest with Oracle ODM and Sybase CIO)

Symantec Storage Foundation HA

Symantec Storage Foundation CFS

Symantec Volume Replicator (VVR)

Symantec Enterprise Vault

Symantec Pure Disk De-duplication

HP Data Protector

Sun Cluster

Solaris 10

Solaris 10 Zones and Containers with SRM

Solaris 10 ZFS

Sun Java System Enterprise Edition (DSEE or Sun LDAP)

Kerberos

Sun LUSTRE

Solaris and Linux Scripts

Perl Scripts

Summarize NetBackup AVAILABLE_MEDIA output

posted Jun 29, 2010 7:28 AM by Steven Sim
I recently wrote a Perl script to summarize the output of NetBackup's available_media script.

The script output as follows.

$ cat available_media_output.txt |~/scripts/nbu/avm.pl -s 
[PoolName]            [Number of Media] [Available]    [Active (IN) ]    [Full (IN) ]    [Frozen (IN) ]   [CATALOG]
===================================================================================================================
 Pool1                     1 (  1 )       0 (  0 )      1 (  1 )        0 (  0 )        0 (  0 )       0 (  0 )
 Pool2                     7 (  1 )       7 (  1 )      0 (  0 )        0 (  0 )        0 (  0 )       0 (  0 )
 Pool3                     8 (  0 )       8 (  0 )      0 (  0 )        0 (  0 )        0 (  0 )       0 (  0 )
 Pool2                     98 ( 17 )      66 (  0 )      3 (  1 )       29 ( 16 )       0 (  0 )       0 (  0 )
 Pool2                     119 ( 6 )      41 (  6 )      4 (  0 )       67 (  0 )       7 (  0 )       0 (  0 )
 Pool2                     2 (  2 )       1 (  1 )      0 (  0 )        0 (  0 )        0 (  0 )       1 (  1 )
 Pool2                     2 (  0 )       2 (  0 )      0 (  0 )        0 (  0 )        0 (  0 )       0 (  0 )
 Pool2                     11 (  0 )      11 (  0 )      0 (  0 )        0 (  0 )       0 (  0 )       0 (  0 )
 Pool2                     77 ( 19 )      45 (  0 )      7 (  0 )        7 (  5 )       18 ( 14 )      0 (  0 )
 Pool2                     70 (  6 )      16 (  3 )     10 (  1 )       31 (  0 )       13 (  2 )      0 (  0 )
-------------------------------------------------------------------------------------------------------------------
Total (In Library Total)  395 ( 52 )     197 ( 11 )     25 (  3 )      134 ( 21 )       38 ( 16 )       1 (  1 )
-------------------------------------------------------------------------------------------------------------------

   1. The above summarizes the total number of tapes in each volume pool.
   2. The numbers in brackets indicate the number of tapes still in the library for each pool (under the respective categories).

The script also produces a grep friendly long listing format (unlike the native available_media output which is not grep friendly at all...)

For example..

$ cat available_media_19Apr2010.txt |~/scripts/nbu/avm.pl -l -n
1    P10002      Pool2         HCART3          TLD             12              75859867               ACTIVE       
2    P10003      Pool3         HCART2          NONE            -               -                      AVAILABLE    
3    P10004      Pool3         HCART2          NONE            -               -                      AVAILABLE    
4    P10005      Pool3         HCART2          NONE            -               -                      AVAILABLE    
5    P10006      Pool3         HCART2          NONE            -               -                      AVAILABLE    
6    P10007      Pool3         HCART2          NONE            -               -                      AVAILABLE
.
.
.

The script has options to process only specific pools (specified on the command line) and can take data direct from standard input or from a specified data file.

The ability to process directly from standard input allows the administrator to obtain the summarize data in a single step like so

$available_media | avm.pl -s

For those interested in the script's additional functions, please email me at stevensim@principal-systems.com