sg_ses --version (return code: 0)
version: 2.07 20160201
sg_ses --help (return code: 0)
Usage: sg_ses [--descriptor=DN] [--dev-slot-num=SN] [--eiioe=A_F]
[--filter] [--get=STR] [--hex] [--index=IIA | =TIA,II]
[--inner-hex] [--join] [--maxlen=LEN] [--page=PG]
[--raw] [--sas-addr=SA] [--status] [--verbose] [--warn]
DEVICE
sg_ses [--byte1=B1] [--clear=STR] [--control] [--data=H,H...]
[--descriptor=DN] [--dev-slot-num=SN] [--index=IIA | =TIA,II]
[--mask] [--maxlen=LEN] [--nickname=SEN] [--nickid=SEID]
[--page=PG] [--sas-addr=SA] [--set=STR] [--verbose]
DEVICE
sg_ses [--enumerate] [--help] [--list] [--version]
where the main options are:
--clear=STR|-C STR clear field by acronym or position
--control|-c send control information (def: fetch status)
--descriptor=DN|-D DN descriptor name (for indexing)
--dev-slot-num=SN|--dsn=SN|-x SN device slot number (for indexing)
--filter|-f filter out enclosure status flags that are clear
use twice for status=okay entries only
--get=STR|-G STR get value of field by acronym or position
--help|-h print out usage message, use twice for additional
--index=IIA|-I IIA individual index ('-1' for overall) or element
type abbreviation (e.g. 'arr')
--index=TIA,II|-I TIA,II comma separated pair: TIA is type header
index or element type abbreviation;
II is individual index ('-1' for overall)
--join|-j group Enclosure Status, Element Descriptor
and Additional Element Status pages. Use twice
to add Threshold In page
--page=PG|-p PG diagnostic page code (abbreviation or number)
(def: 'ssp' [0x0] (supported diagnostic pages))
--sas-addr=SA|-A SA SAS address in hex (for indexing)
--set=STR|-S STR set value of field by acronym or position
--status|-s fetch status information (default action)
First usage above is for fetching pages or fields from a SCSI enclosure.
The second usage is for changing a page or field in an enclosure. Use
'-hh' for more help, including the options not explained above.