.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ledctl 8" .TH ledctl 8 "May 2023" "LEDCTL Version 0.97 " "Intel(R) Enclosure LED Control Application" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ledctl \- Intel(R) LED control application for a storage enclosures. .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBledctl\fR [\fIOPTIONS\fR] \fIpattern_name\fR=\fIlist_of_devices\fR ... .SH DESCRIPTION .IX Header "DESCRIPTION" The ledctl is an user space application designed to control LEDs associated with each slot in an enclosure or a drive bay. The LEDs of devices listed in \fIlist_of_devices\fR are set to the given pattern \fIpattern_name\fR and all other LEDs are turned off. User must have root privileges to use this application. .PP There are two types of systems: 2\-LEDs systems (Activity LED, Status LED) and 3\-LEDs systems (Activity LED, Locate LED, Fail LED). .PP The ledctl application supports LED management of the SAS/SATA and PCIe storages. .PP Supported protocols/methods for LED management are: .IX Subsection "Supported protocols/methods for LED management are:" .IP \(bu 4 \&\fBSES\-2 and SMP\fR for SAS devices, .IP \(bu 4 \&\fBLED messages over SGPIO\fR for SATA, .IP \(bu 4 \&\fBVMD and NPEM\fR for PCIe. .PP \&\fBSAF-TE\fR protocol is not supported. .PP For SAS/SATA storages supporting controllers may transmit LED management information to the backplane controllers via the SGPIO interface. The SGPIO bus carries bit patterns, which translate into LED blink patterns in accordance with the International Blinking Pattern Interpretation (IBPI) of SFF\-8489 specification for SGPIO. Please note some enclosures do not stick close to the SFF\-8489 specification. It might happen that the enclosure processor will accept the IBPI pattern but it will blink LEDs not according to SFF\-8489 specification or it has a limited number of patterns supported. .PP The ledctl application has been verified to work with Intel(R) storage controllers (i.e. Intel(R) AHCI controller and Intel(R) SAS controller). The application might work with storage controllers of other vendors (especially SCSI/SAS controllers). However, storage controllers of other vendors have not been tested. .PP The ledmon application has the highest priority when accessing LEDs. It means that some patterns set by ledctl may have no effect if ledmon is running (except Locate pattern). .PP The ledctl application is a part of Intel(R) Enclosure LED Utilities. .PP The ledctl utilizes the following documents as references: .IX Subsection "The ledctl utilizes the following documents as references:" .IP \(bu 4 SGPIO (Serial GPIO) \- SFF\-8485 .IP \(bu 4 IBPI (International Blinking Pattern Interpretation) \- SFF\-8489 .IP \(bu 4 LED Enclosure management messages \- AHCI specification rev 1.3, section 12.2.1. .IP \(bu 4 SAS (Serial Attached SCSI) \- T10/1760\-D .IP \(bu 4 SES\-2 (SCSI Enclosure Services\-2) \- T10/1559\-D .IP \(bu 4 SMP (Serial Management Protocol) \- T10/1760\-D .IP \(bu 4 NPEM (Native PCIe Enclosure Management) \- PCIe base specification rev 4.0 .IP \(bu 4 VMD (Intel(R) Volume Management Device) \- Intel(R) VROC (VMD NVMe RAID) Quick .Sp Configuration Guide rev 1.2 .SS "Pattern Names" .IX Subsection "Pattern Names" The ledctl application accepts the following names for \fIpattern_name\fR argument according to SFF\-8489 specification. .IP \fBlocate\fR 8 .IX Item "locate" Turns Locate LED associated with the given device(s) on. .IP \fBlocate_off\fR 8 .IX Item "locate_off" Turns only Locate LED off. .IP \fBnormal\fR 8 .IX Item "normal" Turns Status LED, Failure LED and Locate LED off. .IP \fBoff\fR 8 .IX Item "off" Turns only Status LED and Failure LED off. .IP "\fBica\fR or \fBdegraded\fR" 8 .IX Item "ica or degraded" Visualizes "In a Critical Array" pattern. .IP \fBrebuild\fR 8 .IX Item "rebuild" Visualizes "Rebuild" pattern. .IP "\fBifa\fR or \fBfailed_array\fR" 8 .IX Item "ifa or failed_array" Visualizes "In a Failed Array" pattern. .IP \fBhotspare\fR 8 .IX Item "hotspare" Visualizes "Hotspare" pattern. .IP \fBpfa\fR 8 .IX Item "pfa" Visualizes "Predicted Failure Analysis" pattern. .IP "\fBfailure\fR or \fBdisk_failed\fR" 8 .IX Item "failure or disk_failed" Visualizes "Failure" pattern. .IP \fBses_abort\fR 8 .IX Item "ses_abort" SES\-2 R/R ABORD .IP \fBses_rebuild\fR 8 .IX Item "ses_rebuild" SES\-2 REBUILD/REMAP .IP \fBses_ifa\fR 8 .IX Item "ses_ifa" SES\-2 IN FAILED ARRAY .IP \fBses_ica\fR 8 .IX Item "ses_ica" SES\-2 IN CRIT ARRAY .IP \fBses_cons_check\fR 8 .IX Item "ses_cons_check" SES\-2 CONS CHECK .IP \fBses_hotspare\fR 8 .IX Item "ses_hotspare" SES\-2 HOT SPARE .IP \fBses_rsvd_dev\fR 8 .IX Item "ses_rsvd_dev" SES\-2 RSVD DEVICE .IP \fBses_ok\fR 8 .IX Item "ses_ok" SES\-2 OK .IP \fBses_ident\fR 8 .IX Item "ses_ident" SES\-2 IDENT .IP \fBses_rm\fR 8 .IX Item "ses_rm" SES\-2 REMOVE .IP \fBses_insert\fR 8 .IX Item "ses_insert" SES\-2 INSERT .IP \fBses_missing\fR 8 .IX Item "ses_missing" SES\-2 MISSING .IP \fBses_dnr\fR 8 .IX Item "ses_dnr" SES\-2 DO NOT REMOVE .IP \fBses_active\fR 8 .IX Item "ses_active" SES\-2 ACTIVE .IP \fBses_enable_bb\fR 8 .IX Item "ses_enable_bb" SES\-2 ENABLE BYP B .IP \fBses_enable_ba\fR 8 .IX Item "ses_enable_ba" SES\-2 ENABLE BYP A .IP \fBses_devoff\fR 8 .IX Item "ses_devoff" SES\-2 DEVICE OFF .IP \fBses_fault\fR 8 .IX Item "ses_fault" SES\-2 FAULT .IP \fBses_prdfail\fR 8 .IX Item "ses_prdfail" SES\-2 PRDFAIL .SS "Patterns Translation" .IX Subsection "Patterns Translation" When non SES\-2 pattern is send to device in enclosure automatic translation is being done. .IP \fBlocate\fR 8 .IX Item "locate" \&\fIlocate\fR is translated to \fIses_ident\fR .IP \fBlocate_off\fR 8 .IX Item "locate_off" \&\fIlocate_off\fR is translated to \fI~ses_ident\fR .IP "\fBnormal\fR or \fBoff\fR" 8 .IX Item "normal or off" \&\fInormal\fR or \fIoff\fR is translated to \fIses_ok\fR .IP "\fBica\fR or \fBdegraded\fR" 8 .IX Item "ica or degraded" \&\fIica\fR or \fIdegraded\fR is translated to \fIses_ica\fR .IP \fBrebuild\fR 8 .IX Item "rebuild" \&\fIrebuild\fR is translated to \fIses_rebuild\fR .IP "\fBifa\fR or \fBfailed_array\fR" 8 .IX Item "ifa or failed_array" \&\fIifa\fR or \fIfailed_array\fR is translated to \fIses_ifa\fR .IP \fBhotspare\fR 8 .IX Item "hotspare" \&\fIhotspare\fR is translated to \fIses_hotspare\fR .IP \fBpfa\fR 8 .IX Item "pfa" \&\fIpfa\fR is translated to \fIses_prdfail\fR .IP "\fBfailure\fR or \fBdisk_failed\fR" 8 .IX Item "failure or disk_failed" \&\fIfailure\fR or \fIdisk_failed\fR is translated to \fIses_fault\fR .SS "List of Devices" .IX Subsection "List of Devices" The application accepts a list of devices in two formats. The first format is a list with comma separated elements. The second format is a\ list in curly braces and elements are separated by space. See examples section below for details. .PP A device is a path to file in /dev directory or in /sys/block directory. .PP The LEDs of devices listed in \fIlist_of_devices\fR are set to the given pattern \fIpattern_name\fR and all other LEDs, on all devices, are turned off (unless \-\-listed\-only option is given). .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-l\fR or \fB\-\-log\fR=\fIpath\fR" 8 .IX Item "-l or --log=path" Sets a path to local log file. If this option is specified the global log file \fI/var/log/ledctl.log\fR is not used. .IP "\fB\-h\fR or \fB\-\-help\fR" 8 .IX Item "-h or --help" Prints this text out and exits. .IP "\fB\-v\fR or \fB\-\-version\fR" 8 .IX Item "-v or --version" Displays version of ledctl and information about the license and exits. .IP "\fB\-L\fR or \fB\-\-list\-controllers\fR" 8 .IX Item "-L or --list-controllers" Prints information (system path and type) of all controllers detected by ledmon and exits. .IP "\fB\-P\fR or \fB\-\-list\-slots\fR \fB\-\-controller\-type\fR=\fIcontroller-type\fR" 8 .IX Item "-P or --list-slots --controller-type=controller-type" Prints all slots for the controller type. Slot definition depends on the controller and is unique across all controllers of the same type. .Sp Definitions for supported controller types are described below: .RS 8 .IP \(bu 4 VMD \- PCI Express Hot Plug Controller Driver slot number .IP \(bu 4 NPEM \- PCI Express Downstream Port address .RE .RS 8 .Sp Command returns a list of all slots for the controller type with current state and attached device name (if any). \fIcontroller-type\fR is type of controller (vmd, NPEM) that should be scanned here. .RE .IP "\fB\-G\fR or \fB\-\-get\-slot\fR \fB\-\-controller\-type\fR=\fIcontroller-type\fR \fB\-\-device\fR=\fIdevice\fR" 8 .IX Item "-G or --get-slot --controller-type=controller-type --device=device" Displays slot details of given device. \fIdevice\fR is devnode of selected drive. .IP "\fB\-G\fR or \fB\-\-get\-slot\fR \fB\-\-controller\-type\fR=\fIcontrolle-typer\fR \fB\-\-slot\fR=\fIslot\fR" 8 .IX Item "-G or --get-slot --controller-type=controlle-typer --slot=slot" Displays details of given slot. \fIslot\fR is unique slot identifier. .IP "\fB\-S\fR or \fB\-\-set\-slot\fR \fB\-\-controller\-type\fR=\fIcontroller-type\fR \fB\-\-slot\fR=\fIslot\fR \fB\-\-state\fR=\fIIBPI_state\fR" 8 .IX Item "-S or --set-slot --controller-type=controller-type --slot=slot --state=IBPI_state" Changes led state for given slot. \fIcontroller-type\fR is type of the controller. \&\fIslot\fR is unique slot identifier. \fIIBPI_state\fR is led pattern. .IP "\fB\-x\fR or \fB\-\-listed\-only\fR" 8 .IX Item "-x or --listed-only" With this option ledctl will change state only on devices listed in CLI. The rest of devices will not be touched. .IP "\fB\-\-quiet\fR or \fB\-\-error\fR or \fB\-\-warning\fR or \fB\-\-info\fR or \fB\-\-debug\fR or \fB\-\-all\fR" 8 .IX Item "--quiet or --error or --warning or --info or --debug or --all" Verbose level \- 'quiet' means no logging at all and 'all' means to log everything. The levels are given in order. If user specifies more then one verbose option the last option comes into effect. The default level is \&'warning'. Verbose level also can be set by \fB\-\-log\-level\fR=\fIlevel\fR. .SH FILES .IX Header "FILES" .IP \fI/var/log/ledctl.log\fR 8 .IX Item "/var/log/ledctl.log" Global log file, used by all instances of ledctl application. To force logging to user defined file use \fI\-l\fR option switch. .SH EXAMPLES .IX Header "EXAMPLES" The following example illustrates how to set \fIlocate\fR on a single block device. Note that all remaining LEDs, on all devices, will be turned off. .PP .Vb 1 \& ledctl locate=/dev/sda .Ve .PP The following example illustrates how to set \fIlocate_off\fR on a single block device. .PP .Vb 1 \& ledctl \-\-listed\-only locate_off=/dev/sda .Ve .PP The following example illustrates how to set \fIoff\fR on the given devices. It uses second format of device list. .PP .Vb 1 \& ledctl \-\-listed\-only off={ /dev/sda /dev/sdb } .Ve .PP The following example illustrates how to set \fIlocate\fR and \fIrebuild\fR on different devices at the same time. It uses the second format of device list. .PP .Vb 1 \& ledctl \-\-listed\-only locate={ /dev/sdb } rebuild={ /sys/block/sdc } .Ve .PP The following example illustrates how to \fIlocate\fR on three block devices. It uses the first format of device list. .PP .Vb 1 \& ledctl \-\-listed\-only locate=/dev/sda,/dev/sdb,/dev/sdc .Ve .PP The following example illustrates how to set \fIlocate\fR and \fIrebuild\fR on different devices at the same time. It uses the first format of device list. .PP .Vb 1 \& ledctl \-\-listed\-only locate=/dev/sdb rebuild=/sys/block/sdc .Ve .PP The following example illustrates how to set \fIlocate\fR and \fIrebuild\fR on different devices at the same time. It uses the both formats of device list. .PP .Vb 1 \& ledctl \-\-listed\-only locate={ /dev/sdb } rebuild=/sys/block/sdc .Ve .SH LICENSE .IX Header "LICENSE" Copyright (c) 2009\-2022 Intel Corporation. .PP This program is distributed under the terms of the GNU General Public License as published by the Free Software Foundation. See the built-in help for details on the License and the lack of warranty. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBledmon\fR\|(8), \fBledmon.conf\fR\|(5) .SH AUTHOR .IX Header "AUTHOR" This manual page was written by Artur Wojcik . It may be used by others.