xref: /freebsd/usr.sbin/sesutil/sesutil.8 (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1.\" Copyright (c) 2015 Baptiste Daroussin <bapt@FreeBSD.org>
2.\" 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.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd July 5, 2022
28.Dt SESUTIL 8
29.Os
30.Sh NAME
31.Nm sesutil
32.Nd Utility for managing SCSI Enclosure Services (SES) device
33.Sh SYNOPSIS
34.Nm
35.Cm fault
36.Op Fl u Ar /dev/sesN
37.Ar disk Ns | Ns Cm all
38.Cm on Ns | Ns Cm off
39.Nm
40.Cm fault
41.Fl u Ar /dev/sesN
42.Sm off
43.Ar sesid
44.Sm on
45.Cm on Ns | Ns Cm off
46.Nm
47.Cm locate
48.Op Fl u Ar /dev/sesN
49.Ar disk Ns | Ns Cm all
50.Cm on Ns | Ns Cm off
51.Nm
52.Cm locate
53.Fl u Ar /dev/sesN
54.Ar sesid
55.Cm on Ns | Ns Cm off
56.Nm
57.Cm map
58.Op Fl -libxo Ar options
59.Op Fl u Ar /dev/sesN
60.Nm
61.Cm show
62.Op Fl -libxo Ar options
63.Op Fl u Ar /dev/sesN
64.Nm
65.Cm status
66.Op Fl -libxo Ar options
67.Op Fl u Ar /dev/sesN
68.Sh DESCRIPTION
69The
70.Nm
71utility can be used to query and modify various parameter of SCSI Enclosure
72Services (SES) devices.
73.Pp
74List of supported commands:
75.Bl -tag -width indent
76.It Cm fault Oo Fl u Ar /dev/sesN Oc Ar disk Ns | Ns Cm all Cm on Ns | Ns Cm off
77Change the state of the external fault LED associated with
78.Ar disk .
79.Ar disk
80can be the device name of the disk, like
81.Ql da12 ,
82or
83.Cm all
84to indicate all disks attached to SES controllers.
85.It Cm fault Fl u Ar /dev/sesN Ar sesid Cm on Ns | Ns Cm off
86Change the state of the external fault LED associated with an element
87connected to the SES controller.
88.Ar sesid
89must be the element ID of a valid item attached to the controller.
90Use the
91.Cm map
92command to list the elements attached to a controller.
93.It Cm locate Oo Fl u Ar /dev/sesN Oc Ar disk Ns | Ns Cm all Cm on Ns | Ns Cm off
94Change the state of the external locate LED associated with
95.Ar disk .
96.Ar disk
97can be the device name of the disk, like
98.Ql da12 ,
99or
100.Cm all
101to indicate all disks attached to SES controllers.
102.It Cm locate Fl u Ar /dev/sesN Ar sesid Cm on Ns | Ns Cm off
103Change the state of the external locate LED associated with an element
104connected to the SES controller.
105.Ar sesid
106must be the element ID of a valid item attached to the controller.
107Use the
108.Cm map
109command to list the elements attached to a controller.
110.It Cm map Oo Fl -libxo Ar options Oc Op Fl u Ar /dev/sesN
111Display a map of all elements connected to the specified
112.Xr ses 4
113controller.
114If no controller is specified, all controllers are mapped.
115.It Cm show Oo Fl -libxo Ar options Oc Op Fl u Ar /dev/sesN
116Display user-friendly summary of specified
117.Xr ses 4
118controller.
119If no controller is specified, all controllers are mapped.
120.It Cm status Oo Fl -libxo Ar options Oc Op Fl u Ar /dev/sesN
121Display the status of the specified
122.Xr ses 4
123controller.
124If no controller is specified, the status of each controller is returned.
125.El
126.Pp
127Common options:
128.Bl -tag -width indent
129.It Fl -libxo Ar options
130Generate output via
131.Xr libxo 3
132in a selection of different human and machine readable formats.
133See
134.Xr xo_parse_args 3
135.El
136.Sh EXAMPLES
137Turn off all locate LEDs:
138.Pp
139.Dl Nm Cm locate all off
140.Pp
141Turn on the locate LED for the drive bay corresponding to
142.Pa da15 :
143.Pp
144.Dl Nm Cm locate da15 on
145.Pp
146Turn on the fault LED for a drive bay not associated with a device:
147.Pp
148.Dl Nm Cm fault -u /dev/ses2 7 on
149.Sh SEE ALSO
150.Xr libxo 3 ,
151.Xr xo_parse_args 3 ,
152.Xr ses 4
153.Sh HISTORY
154The
155.Nm
156utility first appeared in
157.Fx 11.0 .
158.Sh AUTHORS
159.An -nosplit
160The
161.Nm
162utility was written by
163.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org
164and
165.An Allan Jude Aq Mt allanjude@FreeBSD.org .
166