Tape backup operation: swapping tapes
Posted on August 19th, 2010
Sometimes I need to pull large number of tapes from large tape library driven by Netbackup and replace them with fresh ones. Manual selection of media from Netbackup’s java GUI annoys me, so there is a small piece of shell code to batch eject of tapes from command line. Replace $HOST with your media server hostname.
#!/bin/sh if [ $# -ne 1 ]; then echo Usage: $0 [number of tapes to eject] exit 1 fi NUM=$1 MEDIA_LIST= $HOST=backup-server for media in `vmquery -w -a | \ awk '$3=="HCART2" && $7=="TLD" && $12 != "scratch" {print $1, $15}' \ | sort -k2 -n -r | awk '{print $1}' | head -$NUM` do if [ -z "$MEDIA_LIST" ]; then MEDIA_LIST=$media else MEDIA_LIST=$MEDIA_LIST:$media fi done echo $MEDIA_LIST vmchange -res -w -rh $HOST -rt tld -rn 0 -multi_eject -ml $MEDIA_LIST
After batch of tapes was loaded into your library CAP you will be prompted to empty the CAP and continue with eject.
*** Eject volume batch #1 is ready to be removed ***
remove 10 volume(s) from media access port(s) of robot number 0 now
(press <RETURN> to continue)Filed under Tape Libraries, Veritas NetBackup | No Comments »
Monitoring free memory in Solaris
Posted on August 4th, 2010
This post introduces a little plugin for Nagios NMS you can use to monitor free physical memory in Solaris OS. It should be run locally or by nrpe daemon and depends on kstat Solaris command. You can find brief description and usage from plugin file itself. nagios plugin for Solaris free memory monitoring
Tags: monitoring, Nagios, Solaris
Filed under Plugins, Solaris | No Comments »