From owner-freebsd-questions Wed Oct 30 11:42:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD66037B401 for ; Wed, 30 Oct 2002 11:42:08 -0800 (PST) Received: from agape.wingnet.net (agape.wingnet.net [206.30.215.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3701C43E3B for ; Wed, 30 Oct 2002 11:42:08 -0800 (PST) (envelope-from trevarthan@wingnet.net) Received: from david.wingnet.net (makrothumia.wingnet.net [206.30.215.5]) by agape.wingnet.net (8.12.3/8.12.3) with ESMTP id g9UJfvoK094887 for ; Wed, 30 Oct 2002 14:41:57 -0500 (EST) (envelope-from trevarthan@wingnet.net) Content-Type: text/plain; charset="us-ascii" From: Matthias Trevarthan Reply-To: trevarthan@wingnet.net Organization: Urokosodoji, Inc. To: freebsd-questions@FreeBSD.ORG Subject: Sony AIT tape position question Date: Wed, 30 Oct 2002 15:41:55 -0400 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200210301441.55643.trevarthan@wingnet.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Howdy peeps, I've got a not-so-quick question for ya: I have a Sony AIT tape drive (one of the nifty 4 tape autoloaders): TSL-S= A300C It has a nice little display on the front that indicates the tape's "woun= d"=20 status. When the tape is fully rewound, the bar graph is full. When the t= ape=20 is fully recorded, or wound, the bar graph is empty. Is there any way that I can detect this programmatically? I would like my= =20 scripts to be intelligent enough that they can approximate the size requi= red=20 for a dump, and the size left on the tape. (I would also like to detect which tape I have loaded at any given point,= but=20 I suspect that is outside the bounds of standard SCSI communication. I'd=20 probably need some proprietary code to do this...) When I use the 'mt' command with 'rdspos' I get a block number. Would thi= s=20 number be useful in determining how wound the tape is? If so, how would I= go=20 about interpreting this as a percentage or as a byte volume? I'm from the windows world, so I'm not very familiar with block sizes. I=20 understand bytes though, so if I can translate the block number I'll be=20 alright. Feel free to throw programming concepts and code at me. I'm a proficient=20 programmer. (I just don't know what the heck a SCSI logical block is) Thanks! Matthias To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message