Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display oldest tapes on library 2

Status
Not open for further replies.
Aug 22, 2002
113
0
0
FR
Hello,


I’m looking for a command or script that will display the tapes in the library with the oldest savesets, ordered by age.

Thanks for your help.
 
Here's a script I use for this. It displays all volumes that the server knows about, so if you want to specify just a single jukebox you'll have to either grep the output or modify the script to add a "-q location=whatever" param in the mminfo command.

Code:
#!/bin/ksh
typeset -L8 PRINTDATE
mminfo -s $1 -a -r "volaccess,volume,written,%used,pool(20),location,state" | grep -v "vl access" | while read DATE REST
        do
        if [ "$DATE" != undef ]; then
                MM=$(echo $DATE | cut -d/ -f1)
                DD=$(echo $DATE | cut -d/ -f2)
                YY=$(echo $DATE | cut -d/ -f3)
                PRINTDATE=$YY/$MM/$DD
        else
                PRINTDATE="undef"
        fi
        [ -n "$REST" ] && echo "$PRINTDATE $REST"
done | sort

The slight problem is that these days the volaccess attribute also reports on read times, despite older man pages saying something different.
 
This script is excellent! Just what I was looking for.

Thank you very much.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top