SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
List tapes available
Author Message
Post List tapes available 
I need to list the available tapes each day that have space available and
can be used for backups.








Note: To sign off this list, send a "signoff networker" command via email
should be sent to stan < at > temple.edu

Post List tapes available 
Ciolek, Ken wrote:
I need to list the available tapes each day that have space available and
can be used for backups.


Here's what I do:

1. List all tapes in location Jukebox 1. Put this into a script called
"showjb". (I request more info than you might want)



/usr/sbin/mminfo -a -r \
'volume,barcode,%used,pool,location,olabel,volaccess,state,type' \
| grep jukebox1

(If you're not specifically interested in tapes that are in the jukebox,
just remove the "| grep jukebox1" and continue as follows:)

2. Pipe the output of the above to grep, searching for "%"
(I put that into another one-line script called "showavailable:")


(I have another one that looks for empty slots and another that looks
for unlabeled tapes, but these use nsrjb to query the jukebox)

So today I got:

Full.0560 B00012 93% Full jukebox1 05/24/04 12/07/04 8mm AIT-3
Full.0561 B00011 0.7% Full jukebox1 05/14/04 10/29/04 8mm AIT-3
Full.0595 B00192 0% Full jukebox1 11/22/04 11/22/04 8mm AIT-3
Index.0029 A00305 99% Index jukebox1 11/29/04 12/08/04 8mm AIT-2
Linux1.0537 B00200 94% Linux1 jukebox1 11/24/04 12/08/04 8mm AIT-3
Linux1.0540 B00203 0% Linux1 jukebox1 11/24/04 11/24/04 8mm AIT-3
Linux1.0541 B00223 0% Linux1 jukebox1 12/03/04 12/03/04 8mm AIT-3
Linux1.0542 B00224 0% Linux1 jukebox1 12/03/04 12/03/04 8mm AIT-3
Linux1.0543 B00225 0% Linux1 jukebox1 12/03/04 12/03/04 8mm AIT-3
Linux1.0544 B00226 0% Linux1 jukebox1 12/03/04 12/03/04 8mm AIT-3
lnx57.0470 B00216 0% lnx57 jukebox1 12/02/04 12/02/04 8mm AIT-3
lnx57.0471 B00217 0% lnx57 jukebox1 12/02/04 12/02/04 8mm AIT-3
lnx57.0472 B00218 0% lnx57 jukebox1 12/03/04 12/03/04 8mm AIT-3
lnx57.0473 B00219 0% lnx57 jukebox1 12/03/04 12/03/04 8mm AIT-3
lnx57.0474 B00220 0% lnx57 jukebox1 12/03/04 12/03/04 8mm AIT-3
lnx57.0475 B00221 0% lnx57 jukebox1 12/03/04 12/03/04 8mm AIT-3
lnx57.0476 B00222 0% lnx57 jukebox1 12/03/04 12/03/04 8mm AIT-3














--
Note: To sign off this list, send a "signoff networker" command via email
should be sent to stan < at > temple.edu


=============================================================
Matthew Temple Tel: 617/632-2597
Director, Research Computing Fax: 617/582-7820
Dana-Farber Cancer Institute mht < at > research.dfci.harvard.edu
44 Binney Street, LG300/300 http://research.dfci.harvard.edu
Boston, MA 02115 Choice is the Choice!

Note: To sign off this list, send a "signoff networker" command via email
should be sent to stan < at > temple.edu

Post List tapes available 
Ciolek, Ken wrote :

I need to list the available tapes each day that have space available and
can be used for backups.

You can use the following mminfo queries for instance :

Empty tapes :
mminfo -q "near,written=0,!volrecycle" -r volume,pool,barcode

Recyclable tapes :
mminfo -q "near,volrecycle" -r volume,pool,barcode

Partially filled tapes :
mminfo -q "near,!full,written>0" -r volume,pool,barcode,written

If you are interested in tapes that are not necessarily in your library,
you can remove the "near", and add "location" to the fields listed after
the -r.

Note: To sign off this list, send a "signoff networker" command via email
should be sent to stan < at > temple.edu

Post List tapes available 
Philippe Michel wrote:
Ciolek, Ken wrote :

I need to list the available tapes each day that have space available and
can be used for backups.


You can use the following mminfo queries for instance :

Empty tapes :
mminfo -q "near,written=0,!volrecycle" -r volume,pool,barcode

Recyclable tapes :
mminfo -q "near,volrecycle" -r volume,pool,barcode

Partially filled tapes :
mminfo -q "near,!full,written>0" -r volume,pool,barcode,written

If you are interested in tapes that are not necessarily in your library,
you can remove the "near", and add "location" to the fields listed after
the -r.


And bash won't like the double quotes around a string with a "!"
in it so use single quotes. And thanks; I should have known there were
batter ways for getting information via mminfo.

mht

=============================================================
Matthew Temple Tel: 617/632-2597
Director, Research Computing Fax: 617/582-7820
Dana-Farber Cancer Institute mht < at > research.dfci.harvard.edu
44 Binney Street, LG300/300 http://research.dfci.harvard.edu
Boston, MA 02115 Choice is the Choice!

Note: To sign off this list, send a "signoff networker" command via email
should be sent to stan < at > temple.edu

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB