Does the tape library need cleaning?
Dan Langille
dan at langille.org
Sat May 28 22:03:44 UTC 2011
I'm wondering if there is a way to query my tape library to see if cleaning is required? This information is shown on the display of the unit, but I'd like to query the device and display it on a webpage.
Here is what I have.
$ mtx -f /dev/pass11 inquiry
Product Type: Medium Changer
Vendor ID: 'DEC '
Product ID: 'TL800 (C) DEC'
Revision: '0326'
Attached Changer API: No
I'm guessing I need to know more about about the scsi commands I can send to the device and use camcontrol to extract the information. Much like this command pulls back data (as extracted from a a:
set -- `camcontrol cmd $tape -v -t 3 -c "4d 0 43 0 0 0 0 0 40 0" -i 64 \
"{skip} *i4 \
{skip} *i4 \
{Corrected errors with substantial delay } i4 \
{skip} *i4 \
{Corrected errors with possible delay } i4 \
{skip} *i4 \
{Total errors } i4 \
{skip} *i4 \
{Total errors corrected } i4 \
{skip} *i4 \
{Total times correction algorithm processed} i4 \
{skip} *i4 \
{Total bytes processed } i2 i3 i3 \
{skip} *i4 \
{Total uncorrected errors } i4"
`
echo " Corrected errors with substantial delay: $1"
echo " Corrected errors with possible delay : $2"
echo " Total errors : $3"
echo " Total errors corrected : $4"
echo " Total times correction algorithm used : $5"
tmp=`echo "($6 * 16777216 + $7) * 16777216 + $8" | bc`
echo " Total bytes processed : $tmp"
--
Dan Langille - http://langille.org
More information about the freebsd-scsi
mailing list