Blame doc/ledctl.pod

Packit 7e09eb
#
Packit 7e09eb
#  Intel(R) Enclosure LED Utilities
Packit 7e09eb
#  Copyright (C) 2009-2020 Intel Corporation.
Packit 7e09eb
#
Packit 7e09eb
#  This program is free software; you can redistribute it and/or modify it
Packit 7e09eb
#  under the terms and conditions of the GNU General Public License,
Packit 7e09eb
#  version 2, as published by the Free Software Foundation.
Packit 7e09eb
#
Packit 7e09eb
#  This program is distributed in the hope it will be useful, but WITHOUT
Packit 7e09eb
#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit 7e09eb
#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
Packit 7e09eb
#  more details.
Packit 7e09eb
#
Packit 7e09eb
#  You should have received a copy of the GNU General Public License along with
Packit 7e09eb
#  this program; if not, write to the Free Software Foundation, Inc., 
Packit 7e09eb
#  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
Packit 7e09eb
#
Packit 7e09eb
=head1 NAME
Packit 7e09eb
Packit 7e09eb
ledctl - Intel(R) LED control application for a storage enclosures.
Packit 7e09eb
Packit 7e09eb
=head1 SYNOPSIS
Packit 7e09eb
Packit 7e09eb
B<ledctl> [I<OPTIONS>] I<pattern_name>=I<list_of_devices> ...
Packit 7e09eb
Packit 7e09eb
=head1 DESCRIPTION
Packit 7e09eb
Packit 7e09eb
The ledctl is an user space application designed to control LEDs associated with each
Packit 7e09eb
slot in an enclosure or a drive bay. The LEDs of devices listed in I<list_of_devices>
Packit 7e09eb
are set to the given pattern I<pattern_name> and all other LEDs are turned off.
Packit 7e09eb
User must have root privileges to use this application.
Packit 7e09eb
Packit 7e09eb
There are two types of systems: 2-LEDs systems (Activity LED, Status LED)
Packit 7e09eb
and 3-LEDs systems (Activity LED, Locate LED, Fail LED).
Packit 7e09eb
The ledctl application uses SGPIO and SES-2 protocol to control LEDs.
Packit 7e09eb
The program implements IBPI patterns of SFF-8489 specification for SGPIO.
Packit 7e09eb
Please note some enclosures do not stick close to SFF-8489 specification.
Packit 7e09eb
It might happen that enclosure's processor will accept an IBPI pattern but it will
Packit 7e09eb
blink the LEDs at variance with SFF-8489 specification or it has limited number
Packit 7e09eb
of patterns supported.
Packit 7e09eb
Packit 7e09eb
LED management (AHCI) and S<SAF-TE> protocols are not supported.
Packit 7e09eb
Packit 7e09eb
The ledctl application has been verified to work with Intel(R) storage
Packit 7e09eb
controllers (i.e. Intel(R) AHCI controller and Intel(R) SAS controller).
Packit 7e09eb
The application might work with storage controllers of other vendors
Packit 7e09eb
(especially SCSI/SAS controllers). However, storage controllers of other
Packit 7e09eb
vendors have not been tested.
Packit 7e09eb
Packit 7e09eb
The ledmon application has the highest priority when accessing LEDs.
Packit 7e09eb
It means that some patterns set by ledctl may have no effect if ledmon is running
Packit 7e09eb
(except Locate pattern).
Packit 7e09eb
Packit 7e09eb
The ledctl application is a part of Intel(R) Enclosure LED Utilities.
Packit 7e09eb
Packit 7e09eb
=head2 Pattern Names
Packit 7e09eb
Packit 7e09eb
The ledctl application accepts the following names for I<pattern_name> argument
Packit 7e09eb
according to SFF-8489 specification.
Packit 7e09eb
Packit 7e09eb
=over 8
Packit 7e09eb
Packit 7e09eb
=item B<locate>
Packit 7e09eb
Packit 7e09eb
Turns Locate LED associated with the given device(s) on.
Packit 7e09eb
Packit 7e09eb
=item B<locate_off>
Packit 7e09eb
Packit 7e09eb
Turns only Locate LED off.
Packit 7e09eb
Packit 7e09eb
=item B<normal>
Packit 7e09eb
Packit 7e09eb
Turns Status LED, Failure LED and Locate LED off.
Packit 7e09eb
Packit 7e09eb
=item B<off>
Packit 7e09eb
Packit 7e09eb
Turns only Status LED and Failure LED off.
Packit 7e09eb
Packit 7e09eb
=item B<ica> or B<degraded>
Packit 7e09eb
Packit 7e09eb
Visualizes "In a Critical Array" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<rebuild>
Packit 7e09eb
Packit 7e09eb
Visualizes "Rebuild" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<ifa> or B<failed_array>
Packit 7e09eb
Packit 7e09eb
Visualizes "In a Failed Array" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<hotspare>
Packit 7e09eb
Packit 7e09eb
Visualizes "Hotspare" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<pfa>
Packit 7e09eb
Packit 7e09eb
Visualizes "Predicted Failure Analysis" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<failure> or B<disk_failed>
Packit 7e09eb
Packit 7e09eb
Visualizes "Failure" pattern.
Packit 7e09eb
Packit 7e09eb
=item B<ses_abort>
Packit 7e09eb
Packit 7e09eb
SES-2 R/R ABORD
Packit 7e09eb
Packit 7e09eb
=item B<ses_rebuild>
Packit 7e09eb
Packit 7e09eb
SES-2 REBUILD/REMAP
Packit 7e09eb
Packit 7e09eb
=item B<ses_ifa>
Packit 7e09eb
Packit 7e09eb
SES-2 IN FAILED ARRAY
Packit 7e09eb
Packit 7e09eb
=item B<ses_ica>
Packit 7e09eb
Packit 7e09eb
SES-2 IN CRIT ARRAY
Packit 7e09eb
Packit 7e09eb
=item B<ses_cons_check>
Packit 7e09eb
Packit 7e09eb
SES-2 CONS CHECK
Packit 7e09eb
Packit 7e09eb
=item B<ses_hotspare>
Packit 7e09eb
Packit 7e09eb
SES-2 HOT SPARE
Packit 7e09eb
Packit 7e09eb
=item B<ses_rsvd_dev>
Packit 7e09eb
Packit 7e09eb
SES-2 RSVD DEVICE
Packit 7e09eb
Packit 7e09eb
=item B<ses_ok>
Packit 7e09eb
Packit 7e09eb
SES-2 OK
Packit 7e09eb
Packit 7e09eb
=item B<ses_ident>
Packit 7e09eb
Packit 7e09eb
SES-2 IDENT
Packit 7e09eb
Packit 7e09eb
=item B<ses_rm>
Packit 7e09eb
Packit 7e09eb
SES-2 REMOVE
Packit 7e09eb
Packit 7e09eb
=item B<ses_insert>
Packit 7e09eb
Packit 7e09eb
SES-2 INSERT
Packit 7e09eb
Packit 7e09eb
=item B<ses_missing>
Packit 7e09eb
Packit 7e09eb
SES-2 MISSING
Packit 7e09eb
Packit 7e09eb
=item B<ses_dnr>
Packit 7e09eb
Packit 7e09eb
SES-2 DO NOT REMOVE
Packit 7e09eb
Packit 7e09eb
=item B<ses_active>
Packit 7e09eb
Packit 7e09eb
SES-2 ACTIVE
Packit 7e09eb
Packit 7e09eb
=item B<ses_enable_bb>
Packit 7e09eb
Packit 7e09eb
SES-2 ENABLE BYP B
Packit 7e09eb
Packit 7e09eb
=item B<ses_enable_ba>
Packit 7e09eb
Packit 7e09eb
SES-2 ENABLE BYP A
Packit 7e09eb
Packit 7e09eb
=item B<ses_devoff>
Packit 7e09eb
Packit 7e09eb
SES-2 DEVICE OFF
Packit 7e09eb
Packit 7e09eb
=item B<ses_fault>
Packit 7e09eb
Packit 7e09eb
SES-2 FAULT
Packit 7e09eb
Packit 7e09eb
=item B<ses_prdfail>
Packit 7e09eb
Packit 7e09eb
SES-2 PRDFAIL
Packit 7e09eb
Packit 7e09eb
=back
Packit 7e09eb
Packit 7e09eb
=head2 Patterns Translation
Packit 7e09eb
Packit 7e09eb
When non SES-2 pattern is send to device in enclosure automatic
Packit 7e09eb
translation is being done.
Packit 7e09eb
Packit 7e09eb
=over 8
Packit 7e09eb
Packit 7e09eb
=item B<locate>
Packit 7e09eb
Packit 7e09eb
I<locate> is translated to I<ses_ident> 
Packit 7e09eb
Packit 7e09eb
=item B<locate_off>
Packit 7e09eb
Packit 7e09eb
I<locate_off> is translated to I<~ses_ident>
Packit 7e09eb
Packit 7e09eb
=item B<normal> or B<off>
Packit 7e09eb
Packit 7e09eb
I<normal> or I<off> is translated to I<ses_ok>
Packit 7e09eb
Packit 7e09eb
=item B<ica> or B<degraded>
Packit 7e09eb
Packit 7e09eb
I<ica> or I<degraded> is translated to I<ses_ica>
Packit 7e09eb
Packit 7e09eb
=item B<rebuild>
Packit 7e09eb
Packit 7e09eb
I<rebuild> is translated to I<ses_rebuild>
Packit 7e09eb
Packit 7e09eb
=item B<ifa> or B<failed_array>
Packit 7e09eb
Packit 7e09eb
I<ifa> or I<failed_array> is translated to I<ses_ifa>
Packit 7e09eb
Packit 7e09eb
=item B<hotspare>
Packit 7e09eb
Packit 7e09eb
I<hotspare> is translated to I<ses_hotspare>
Packit 7e09eb
Packit 7e09eb
=item B<pfa>
Packit 7e09eb
Packit 7e09eb
I<pfa> is translated to I<ses_prdfail>
Packit 7e09eb
Packit 7e09eb
=item B<failure> or B<disk_failed>
Packit 7e09eb
Packit 7e09eb
I<failure> or I<disk_failed> is translated to I<ses_fault>
Packit 7e09eb
Packit 7e09eb
=back
Packit 7e09eb
Packit 7e09eb
=head2 List of Devices
Packit 7e09eb
Packit 7e09eb
The application accepts a list of devices in two formats. The first
Packit 7e09eb
format is a list with comma separated elements. The second format is S
Packit 7e09eb
list> in curly braces and elements are separated by space. See examples
Packit 7e09eb
section below for details.
Packit 7e09eb
Packit 7e09eb
A device is a path to file in /dev directory or in /sys/block directory.
Packit 7e09eb
It may identify a block device, a RAID device or a container device.
Packit 7e09eb
In case of a RAID device or a container device a state will be set for all
Packit 7e09eb
block devices associated, respectively.
Packit 7e09eb
Packit 7e09eb
The LEDs of devices listed in I<list_of_devices> are set to the given
Packit 7e09eb
pattern I<pattern_name> and all other LEDs are turned off (unless --listed-only
Packit 7e09eb
option is given).
Packit 7e09eb
Packit 7e09eb
=head1 OPTIONS
Packit 7e09eb
Packit 7e09eb
=over 8
Packit 7e09eb
Packit 7e09eb
=item B<-l> or B<--log>=I<path>
Packit 7e09eb
Packit 7e09eb
Sets a path to local log file. If this option is specified the global log
Packit 7e09eb
file F is not used.
Packit 7e09eb
Packit 7e09eb
=item B<-h> or B<--help>
Packit 7e09eb
Packit 7e09eb
Prints this text out and exits.
Packit 7e09eb
Packit 7e09eb
=item B<-v> or B<--version>
Packit 7e09eb
Packit 7e09eb
Displays version of ledctl and information about the license and exits.
Packit 7e09eb
Packit 7e09eb
=item B<-L> or B<--list-controllers>
Packit 7e09eb
Packit 7e09eb
Prints information (system path and type) of all controllers detected by
Packit 7e09eb
ledmon and exits.
Packit 7e09eb
Packit 7e09eb
=item B<-x> or B<--listed-only>
Packit 7e09eb
Packit 7e09eb
With this option ledctl will change state only on devices listed in CLI. The
Packit 7e09eb
rest of devices will not be touched.
Packit 7e09eb
Packit 7e09eb
=item B<--quiet> or B<--error> or B<--warning> or B<--info> or B<--debug> or B<--all>
Packit 7e09eb
Packit 7e09eb
Verbose level - 'quiet' means no logging at all and 'all' means to log
Packit 7e09eb
everything. The levels are given in order. If user specifies more then one
Packit 7e09eb
verbose option the last option comes into effect. The default level is
Packit 7e09eb
'warning'. Verbose level also can be set by B<--log-level>=I<level>.
Packit 7e09eb
Packit 7e09eb
=back
Packit 7e09eb
Packit 7e09eb
=head1 FILES
Packit 7e09eb
Packit 7e09eb
=over 8
Packit 7e09eb
Packit 7e09eb
=item F
Packit 7e09eb
Packit 7e09eb
Global log file, used by all instances of ledctl application. To force logging
Packit 7e09eb
to user defined file use I<-l> option switch.
Packit 7e09eb
Packit 7e09eb
=back
Packit 7e09eb
Packit 7e09eb
=head1 EXAMPLES
Packit 7e09eb
Packit 7e09eb
The following example illustrates how to locate a single block device.
Packit 7e09eb
Packit 7e09eb
    ledctl locate=/dev/sda
Packit 7e09eb
Packit 7e09eb
The following example illustrates how to turn Locate LED off for the same block device.
Packit 7e09eb
Packit 7e09eb
    ledctl locate_off=/dev/sda
Packit 7e09eb
Packit 7e09eb
The following example illustrates how to locate disks of a RAID device and
Packit 7e09eb
how to set rebuild pattern for two block devices at the same time. This example
Packit 7e09eb
uses both formats of device list.
Packit 7e09eb
Packit 7e09eb
     ledctl locate=/dev/md127 rebuild={ /sys/block/sd[a-b] }
Packit 7e09eb
Packit 7e09eb
The following example illustrates how to turn Status LED and Failure LED off for
Packit 7e09eb
the given device(s).
Packit 7e09eb
Packit 7e09eb
     ledctl off={ /dev/sda /dev/sdb }
Packit 7e09eb
Packit 7e09eb
The following example illustrates how to locate a three block devices. This
Packit 7e09eb
example uses the first format of device list.
Packit 7e09eb
Packit 7e09eb
     ledctl locate=/dev/sda,/dev/sdb,/dev/sdc
Packit 7e09eb
Packit 7e09eb
=head1 LICENSE
Packit 7e09eb
Packit 7e09eb
Copyright (c) 2009-2017 Intel Corporation.
Packit 7e09eb
Packit 7e09eb
This program is distributed under the terms of the GNU General Public License
Packit 7e09eb
as published by the Free Software Foundation. See the built-in help for
Packit 7e09eb
details on the License and the lack of warranty.
Packit 7e09eb
Packit 7e09eb
=head1 SEE ALSO
Packit 7e09eb
Packit 7e09eb
ledmon(8), ledmon.conf(5)
Packit 7e09eb
Packit 7e09eb
=head1 AUTHOR
Packit 7e09eb
Packit 7e09eb
This manual page was written by Artur Wojcik <artur.wojcik@intel.com>. It may
Packit 7e09eb
be used by others.