Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2011 18:03:41 -0400
From:      Dan Langille <dan@langille.org>
To:        freebsd-scsi@freebsd.org
Subject:   Does the tape library need cleaning?
Message-ID:  <C11C1FC4-8D39-4503-9CFF-00DC8544987D@langille.org>

next in thread | raw e-mail | index | archive | help
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=3D`echo "($6 * 16777216 + $7) * 16777216 + $8" | bc`
  echo "                Total bytes processed                  : $tmp"



--=20
Dan Langille - http://langille.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C11C1FC4-8D39-4503-9CFF-00DC8544987D>