1.\" Copyright (c) 2000 2.\" Matthew Jacob <mjacob@openbsd.org>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $OpenBSD: ses.4,v 1.5 2001/06/22 12:15:46 mpech Exp $ 27.\" 28.Dd February 22, 2000 29.Dt SES 4 30.Os 31.Sh NAME 32.Nm ses 33.Nd SCSI Environmental Services Driver 34.Sh SYNOPSIS 35.Cd ses* at scsibus? target ? lun ? 36.Sh DESCRIPTION 37The 38.Nm 39driver provides support for all 40.Tn SCSI 41devices of the environmental services class that are attached to the system 42through a supported 43.Tn SCSI 44Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible 45Fault Tolerant Enclosures). 46The environmental services class generally are enclosure devices that 47provide environmental information such as number of power supplies (and 48state), temperature, device slots, and so on. 49.Pp 50A 51.Tn SCSI 52Host 53adapter must also be separately configured into the system 54before a 55.Tn SCSI 56Environmental Services device can be configured. 57.Sh IOCTLS 58The following 59.Xr ioctl 2 60calls apply to 61.B SES 62devices. 63They are defined in the header file 64.Aq Pa scsi/ses.h 65(\fIq.v.\fR). 66.Pp 67.Bl -tag -width SESIOC_GETENCSTAT 68.It Dv SESIOC_GETNOBJ 69Used to find out how many 70.B SES 71objects are driven by this particular device instance. 72.It Dv SESIOC_GETOBJMAP 73Read, from the kernel, an array of SES objects which contains 74the object identifier, which subenclosure it is in, and the 75.B SES 76type of the object. 77.It Dv SESIOC_GETENCSTAT 78Get the overall enclosure status. 79.It Dv SESIOC_SETENCSTAT 80Set the overall enclosure status. 81.It Dv SESIOC_GETOBJSTAT 82Get the status of a particular object. 83.It Dv SESIOC_SETOBJSTAT 84Set the status of a particular object. 85.It Dv SESIOC_GETTEXT 86Get the associated help text for an object (not yet implemented). 87.B SES 88devices often have descriptive text for an object which can tell 89you things like location (e.g, "left power supply"). 90.It Dv SESIOC_INIT 91Initialize the enclosure. 92.El 93.Sh FILES 94.Bl -tag -width /dev/rsdXXXXX -compact 95.It Pa /dev/ses Ns Ar N 96The \fINth\fR \fBSES\fR device. 97.Sh DIAGNOSTICS 98When the kernel is configured with 99.Tn DEBUG 100enabled, the first open to an SES device will spit out overall enclosure 101parameters to the console. 102.El 103.Sh SEE ALSO 104.Xr getencstat 8 , 105.Xr sesd 8 , 106.Xr setencstat 8 , 107.Xr setobjstat 8 108.Sh HISTORY 109The 110.Nm 111driver was written for the 112.Tn SCSI 113subsystem by Matthew Jacob. This is the functional equivalent of a similar 114driver available in Solaris, Release 7. 115