Networker

[Networker] tape_check.sh (tape count by pool and master/storagenode) - works remotely

2003-11-20 16:44:38
Subject: [Networker] tape_check.sh (tape count by pool and master/storagenode) - works remotely
From: "Reed, Ted G II [ITS]" <ted.reed AT MAIL.SPRINT DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Thu, 20 Nov 2003 15:21:29 -0600
#!/bin/ksh
#
# Script Name: tape_check.sh
#
# Location: /usr/local/Legato/bin
#
# Author: 
#
# Date: November 13, 2001
#
#*******************
# Script Variables *
#*******************

MMINFO=`which mminfo`

#***************
# Main Program *
#***************

clear

$MMINFO -s mastername -av -r 'volume,pool,location' -q "%used=0" >
/tmp/volumes.empty
$MMINFO -s mastername -av -r 'volume,pool,location' -q "volrecycle" >
/tmp/volumes.recycle

for SERV in StorageNode01 StorageNodep02 StorageNodep03 mastername
StorageNodep05
do
  EMPTYMNTH=`grep Month /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYDEFAULT=`grep Default /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYCLONE=`grep Clone /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYBRPOOL=`grep BR /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYOTHER=`egrep -v "Month|Default|Clone|BR" /tmp/volumes.empty |
grep $SERV | wc -l`
  RECYCLEMNTH=`grep Month /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEDEFAULT=`grep Default /tmp/volumes.recycle | grep $SERV | wc
-l`
  RECYCLECLONE=`grep Clone /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEBRPOOL=`grep BR /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEOTHER=`egrep -v "Month|Default|Clone|BR" /tmp/volumes.recycle |
grep $SERV | wc -l`
  echo "\n$SERV: One Month Empty        $EMPTYMNTH"
  echo "$SERV: Default Empty            $EMPTYDEFAULT"
  echo "$SERV: Clone Empty              $EMPTYCLONE"
  echo "$SERV: BR Pool Empty            $EMPTYBRPOOL"
  echo "$SERV: Other Empty              $EMPTYOTHER"
  echo "$SERV: One Month Recycle        $RECYCLEMNTH"
  echo "$SERV: Default Recycle  $RECYCLEDEFAULT"
  echo "$SERV: Clone Recycle            $RECYCLECLONE"
  echo "$SERV: BR Pool Recycle  $RECYCLEBRPOOL"
  echo "$SERV: Other Recycle            $RECYCLEOTHER"
done

rm -f /tmp/volumes.empty /tmp/volumes.recycle

sleep 60 

$MMINFO -s mastername -av -r 'volume,pool,location' -q "%used=0" >
/tmp/volumes.empty
$MMINFO -s mastername -av -r 'volume,pool,location' -q "volrecycle" >
/tmp/volumes.recycle

for SERV in MRLSM000 StorageNodep05 StorageNodep06
do
  EMPTYMNTH=`grep Month /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYDEFAULT=`grep Default /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYCLONE=`grep Clone /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYBRPOOL=`grep BR /tmp/volumes.empty | grep $SERV | wc -l`
  EMPTYOTHER=`egrep -v "Month|Default|Clone|BR" /tmp/volumes.empty |
grep $SERV | wc -l`
  RECYCLEMNTH=`grep Month /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEDEFAULT=`grep Default /tmp/volumes.recycle | grep $SERV | wc
-l`
  RECYCLECLONE=`grep Clone /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEBRPOOL=`grep BR /tmp/volumes.recycle | grep $SERV | wc -l`
  RECYCLEOTHER=`egrep -v "Month|Default|Clone|BR" /tmp/volumes.recycle |
grep $SERV | wc -l`
  echo "\n$SERV: One Month Empty        $EMPTYMNTH"
  echo "$SERV: Default Empty            $EMPTYDEFAULT"
  echo "$SERV: Clone Empty              $EMPTYCLONE"
  echo "$SERV: BR Pool Empty            $EMPTYBRPOOL"
  echo "$SERV: Other Empty              $EMPTYOTHER"
  echo "$SERV: One Month Recycle        $RECYCLEMNTH"
  echo "$SERV: Default Recycle  $RECYCLEDEFAULT"
  echo "$SERV: Clone Recycle            $RECYCLECLONE"
  echo "$SERV: BR Pool Recycle  $RECYCLEBRPOOL"
  echo "$SERV: Other Recycle            $RECYCLEOTHER"
done

rm -f /tmp/volumes.empty /tmp/volumes.recycle

sleep 10

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

<Prev in Thread] Current Thread [Next in Thread>
  • [Networker] tape_check.sh (tape count by pool and master/storagenode) - works remotely, Reed, Ted G II [ITS] <=