Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!mcnc!rutgers!husc6!cmcl2!brl-adm!adm!jepeway@UTKCS2.CS.UTK.EDU
From: jepeway@UTKCS2.CS.UTK.EDU (Chris Jepeway)
Newsgroups: comp.unix.questions
Subject: Getting status of a tape drive
Message-ID: <8500@brl-adm.ARPA>
Date: Mon, 27-Jul-87 12:34:22 EDT
Article-I.D.: brl-adm.8500
Posted: Mon Jul 27 12:34:22 1987
Date-Received: Wed, 29-Jul-87 06:00:26 EDT
Sender: news@brl-adm.ARPA
Lines: 15


'lo,
    I'm writing a c-shell script to do backups on our system, a VAX 8200
running Ultrix 1.2.  I'd like to be able to determine whether there is a
tape mounted and online in the tape drive (a TU81 plus), and I want to be
able to do so regardless of whether some other process is using the drive.
Using `mt status' and then checking the status c-shell variable, or parsing
mt's output, has proven unreliable: mt will often say that there's 
`No such device or address: /dev/rmt12' when, in fact, there's a tape in the
drive and the sucker's online.  I'd prefer to use a standard Unix/Ultrix
program that's out there already, but I can flex to a home grown c program
if need be.  Any help would be greatly appreciated.  I mean greatly.

Thanks Ever,
C. Jepeway