crontab Question
Currently I am running this in cron to send out a scratch pool report...
echo "LTO4 in SCRATCH POOL:"
/usr/openv/volmgr/bin/vmquery -rn 1 -w|awk '{print $1, $3, $9, $12}'|grep -i scratch|grep -v HCART3|wc -l 1>>$OUTFILE1 2>&1
/usr/openv/volmgr/bin/vmquery -rn 1 -w|awk '{print $1, $3, $9, $12}'|grep -i scratch|grep -v HCART3 1>>$OUTFILE1 2>&1
How can I separate this more and only show LTO4 and then have another line that will only show LTO6? Right now its combining both, but I'd like to be able to break this down more and separate the LTO4 from the LTO6 tapes.
It is entirely possible that your tape library is set to only report the leftmost 6 characters (this might be configurable, or it might be hard-coded, you would have to confirm with your library vendor), and that your barcode rule is set to only use those 6.
If your tapes' serial numbers happen to indicate the difference in LTO4 or LTO6, such sas all LTO4 tapes start with a "4" and LTO6s start with a "6", you might be able to use that instead of the L* designation.
If that's not possible, your only method of doing what you want is to go by the HCART/HCART3 designation and hope that no one has misconfigured the tapes.
VMquery only reports on the tape info that has been defined for tapes through barcode rules defined by you or your predecessors in the NetBackup inventory process that recognizes new tapes, or updated by the media manager when tapes are mounted and used. It doesn't detect what the tape type is. I don't know of a way to determine the tape type without one of the methods above.