freebsd-skq/usr.sbin/sesutil/sesutil.8
allanjude e37f0a84b3 MFC: r287473
Add the new sesutil(8) utility for managing SCSI Enclosure Services (SES) device.

MFC: r287493
  Fix iteration bug

MFC: r287485, r287494, r287992
  Please the angry gcc 4.2 gods

MFC: r287988
  Improve and expand sesutil(8)

  Return an error if no matching device is found
  Locate can address a slot, in addition to a drive
  Added fault, similar to locate but blinks a different LED
  Added the map command, lists all devices connected to the SES controller
  Added the status command, overall status of the SES controller

MFC: r292092
  sesutil: fix map not printing the status of the LED device in an array

MFC: r292093
  sesutil: pass the correct element type when printing the SES map

MFC: r292121
  sesutil: Add extra information specific to some SES devices to sesutil map

MFC: r292122
  Fix sesutil locate when a sesid is passed to locate command

MFC: r292262
  Show the enclosure name and id in sesutil map

Relnotes:	yes
Sponsored by:	Gandi.net
Sponsored by:	ScaleEngine Inc.
2016-01-14 01:42:09 +00:00

131 lines
3.9 KiB
Groff

.\" Copyright (c) 2015 Baptiste Daroussin <bapt@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd September 6, 2015
.Dt SESUTIL 8
.Os
.Sh NAME
.Nm sesutil
.Nd Utility for managing SCSI Enclosure Services (SES) device
.Sh SYNOPSIS
.Nm
.Cm fault
.Op Fl u Ar /dev/sesN
.Aq Ar disk | Ar sesid | Li all
.Op on | off
.Nm
.Cm locate
.Op Fl u Ar /dev/sesN
.Aq Ar disk | Ar sesid | Li all
.Op on | off
.Nm
.Cm map
.Op Fl u Ar /dev/sesN
.Nm
.Cm status
.Op Fl u Ar /dev/sesN
.Sh DESCRIPTION
The
.Nm
utility can be used to query and modify various parameter of SCSI Enclosure
Services (SES) devices.
.Pp
List of supported commands:
.Bl -tag -width indent
.It Cm fault Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off
Change the state of the external fault LED associated with
.Ar disk .
.Ar disk
can be the device name of the disk, like
.Cm da12 ,
or
.Ql all .
to indicate all disks attached to SES controllers.
.It Cm fault Fl u Ar /dev/sesN Ar sesid Op on | off
Change the state of the external fault LED associated with an element
connected to the SES controller.
.Ar sesid
must be the element ID of a valid item attached to the controller.
Use the
.Cm map
command to list the elements attached to a controller.
.It Cm locate Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off
Change the state of the external locate LED associated with
.Ar disk .
.Ar disk
can be the device name of the disk, like
.Cm da12 ,
or
.Ql all .
to indicate all disks attached to SES controllers.
.It Cm locate Fl u Ar /dev/sesN Ar sesid Op on | off
Change the state of the external locate LED associated with an element
connected to the SES controller.
.Ar sesid
must be the element ID of a valid item attached to the controller.
Use the
.Cm map
command to list the elements attached to a controller.
.It Cm map Op Fl u Ar /dev/sesN
Display a map of all elements connected to the specified
.Xr ses 4
controller.
If no controller is specified, all controllers are mapped.
.It Cm status Op Fl u Ar /dev/sesN
Display the status of the specified
.Xr ses 4
controller.
If no controller is specified, the status of each controller is returned.
.El
.Sh EXAMPLES
Turn off all locate LEDs:
.Pp
.Dl Nm Cm locate all off
.Pp
Turn on the locate LED for the drive bay corresponding to
.Pa da15 :
.Pp
.Dl Nm Cm locate da15 on
.Pp
Turn on the fault LED for a drive bay not associated with a device:
.Pp
.Dl Nm Cm fault -u /dev/ses2 7 on
.Sh SEE ALSO
.Xr ses 4
.Sh HISTORY
The
.Nm
utility first appeared in
.Fx 11.0 .
.Sh AUTHORS
.An -nosplit
The
.Nm
utility was written by
.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org
and
.An Allan Jude Aq Mt allanjude@FreeBSD.org .