From owner-freebsd-scsi@FreeBSD.ORG Sat Apr 1 19:53:28 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7A8216A420 for ; Sat, 1 Apr 2006 19:53:28 +0000 (UTC) (envelope-from dougg@torque.net) Received: from canuck.infradead.org (canuck.infradead.org [205.233.218.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id E179B43D58 for ; Sat, 1 Apr 2006 19:53:27 +0000 (GMT) (envelope-from dougg@torque.net) Received: from toronto-hse-ppp4083595.sympatico.ca ([70.50.95.231] helo=[192.168.1.101]) by canuck.infradead.org with esmtpsa (Exim 4.54 #1 (Red Hat Linux)) id 1FPm9w-0003Sw-Io; Sat, 01 Apr 2006 14:53:21 -0500 Message-ID: <442ED9F5.8080702@torque.net> Date: Sat, 01 Apr 2006 14:52:21 -0500 From: Douglas Gilbert User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-scsi@freebsd.org X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Bad-Reply: 'Re:' in Subject but no References or In-Reply-To headers Cc: olli@lurza.secnetix.de Subject: Re: Temperature sensor on SCSI disks (IBM / Hitachi) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dougg@torque.net List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2006 19:53:28 -0000 Oliver Fromme wrote: > I have the following SCSI disks in a server: > > at scbus0 target 0 lun 0 (pass0,da0) > at scbus0 target 1 lun 0 (pass1,da1) > > Searching the mailing lists revealed that IBM SCSI disks > (Hitachi nowadays) have a temperature sensor that can be > queried with a special (prioprietary) command like this: > > camcontrol cmd -n da -u 0 -c "4D 0 76 0 0 0 0 0 20 0" -i 32 "s9 i1" > > However, I get: "camcontrol: error sending command". > > Any advice? (I'm using 4-stable, BTW.) Oliver, Perhaps you could try another approach at a slighter higher level. If you can build the sg3_utils package that I announced on this list, then look at the sg_logs utility, specifically "sg_logs -t ". This is the man page of sg_logs for "-t": -t outputs the temperature. First looks in the temperature log page and if that is not available tries the Informational Exceptions page which may also have the current temperature (especially in older disks). So there are two log pages to look at, depending on the age of the disk. BTW If it fails and you want to see the sense data decoded, add '-v'. More generally, smartmontools may be helpful. It is also ported to FreeBSD. Doug Gilbert