From owner-freebsd-questions@FreeBSD.ORG Fri Oct 22 14:25:55 2004 Return-Path: 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 0477F16A4CE for ; Fri, 22 Oct 2004 14:25:55 +0000 (GMT) Received: from mail.intradyn.com (ip67-95-33-115.z33-95-67.customer.algx.net [67.95.33.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87C7243D53 for ; Fri, 22 Oct 2004 14:25:54 +0000 (GMT) (envelope-from hmiller@intradyn.com) Received: from gamma (124-240-168-192.hq.intradyn.com [192.168.240.124] (may be forged)) by mail.intradyn.com (8.12.6/8.12.6) with ESMTP id i9MEPrer088637 for ; Fri, 22 Oct 2004 09:25:53 -0500 (CDT) (envelope-from hmiller@intradyn.com) Message-ID: <200410220926390228.5C9896C4@mail.intradyn.com> X-Mailer: Calypso Version 3.30.00.00 (4) Date: Fri, 22 Oct 2004 09:26:39 -0500 From: "Henry Miller" To: freebsd-questions@freebsd.org Content-Type: text/plain; charset="us-ascii" Subject: Scsi tape sense codes, getting last n (10) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2004 14:25:55 -0000 I'm looking for a way to trace all sense codes come back from a tape drive in Freebsd 4.9. (latter we will go to 5.3, but 4.9 matters today) The programs we use do not check sense codes, much less show them. In theory they could issue a command that fails, then issue a second command that also fails. The second failure will cause the sense code from the first failure to be lost. (yes there are separate control and io errors, but if they are both the same type that doesn't help) My boss does not trust these programs to stop after the first error, so issuing ioctl MTIOCERRSTAT after the program completes is not enough. Therefore I'm looking for some way to hook scsi (/dev/nsa0 in particular) so that I can log sense codes as they occurs, if there are any. Does anyone know of a way to do this? I didn't see anything in the source. We do not want to modify the kernel, or the other programs. I'm also working with the drive manufacture, but so far I have not discovered anything that seems useful. (We are only interested in one model) I think that these programs just stop if there is any error we would care about, but that is not enough. I don't write the requirements, and checking for sense codes after we run the program program does not meet them. Perhaps this could be asked on -scsi, but this isn't a Freebsd issue, just something that runs on top of Freebsd.