Temperature sensor on SCSI disks (IBM / Hitachi)

Douglas Gilbert dougg at torque.net
Sat Apr 1 19:53:28 UTC 2006


Oliver Fromme wrote:

> I have the following SCSI disks in a server:
>
> <IBM DDYS-T18350M S96H>   at scbus0 target 0 lun 0 (pass0,da0)
> <IBM DDYS-T18350M S96H>   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 <dev_name>".

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


More information about the freebsd-scsi mailing list