Networker

Re: [Networker] Determine if a media drive is in use

2007-12-05 11:24:52
Subject: Re: [Networker] Determine if a media drive is in use
From: Fazil Saiyed <Fazil.Saiyed AT ANIXTER DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 5 Dec 2007 10:16:43 -0600
Hello,
I would be interested in the script that looks for tape written over 10 
days ago and then marks them recyclable.
As far as your question, you can use nsradmin to query the devices and 
then use the output to label the tapes, my question is why do you care if 
particular device is in use or not, if you use fast label, it should find 
any open devices and do the label.
Either way
nsradmin
. type nsr device
show name;Message ( you should get tape reading, writing type of messages 
for you to deal with)
print nsr device
should get you what you need, if not substitute show name;Messages with 
which ever field out of Networker devices that interests you, you can also 
use input file to get the correct output from nsradmin and direct the 
output to a txt file for further processing.
If you are worried about mounted drives, then networker should be able to 
handle it automatically when drives need to be unmounted for labeling, you 
can use ideal device time-out value to speed up the unloads when the 
devices are not in use.
HTH

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER