OS Manuals

/usr/bin/sg_ses

SCSI utilities for Linux, Unix and Windows

From sg3-utils 1.49-r3 (enterprise-packages), captured 2026-11-08 by running sg_ses --help (exit 0). permalink

Usage for general access:
    sg_ses  [--all] [--ALL] [--descriptor=DES] [--dev-slot-num=SN]
            [--eiioe=A_F] [--filter] [--get=STR] [--hex]
            [--index=IIA | =TIA,II] [--inner-hex] [--join] [--json[=JO]]
            [--js-file=JFN] [--maxlen=LEN] [--no-config] [--no-time]
            [--page=PG] [--quiet] [--raw] [--readonly] [--sas-addr=SA]
            [--status] [--verbose] [--warn] DEVICE

  where the main general access options are:
    --all|-a            same as --join followed by remaining SES dpages
    --descriptor=DES|-D DES    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 multiple times for more
    --index=IIA|-I IIA    individual index ('-1' for overall) or element
                          type abbreviation (e.g. 'arr'). A range may be
                          given for the individual index (e.g. '2:5')
    --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
    --json[=JO]|-J[=JO]    output in JSON instead of plain text.
                           Use --json=? for JSON help
    --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)
    --status|-s         fetch status information (default action)

The 'general access' usage fetches pages or fields from a SCSI enclosure.
Use '-hh' (or more) for further usage patterns, '-hh' displays the
'control' usage. For examples see '-hhhh' . The term 'diagnostic page'
is often abbreviated to 'dpage'.
Options (37)
OptionDescriptionSource
--descriptor, -D DES|-Dwhere DES is a descriptor name (string) as found in the Element Descriptor dpage.help + man
--dev-slot-num, -x, --dsn SN|--dsn=SN|-xwhere SN is a device slot number found in the Additional Element Status dpage.help + man
--get, -G STR|-Gget value of field by acronym or positionhelp + man
--index, -I IIA|-Iwhere IIA is either an individual index (II) or an Element type abbreviation (A).help + man
--json JO]|-J[=JOoutput in JSON instead of plain text.help
--page, -p PG|-pdiagnostic page code (abbreviation or number) (def: 'ssp' [0x0] (supported diagnostic pages))help + man
--sas-addr, -A SA|-Athis is an indexing method for SAS end devices (e.g. SAS disks).help + man
-a, --allshows the output of the --join option followed by the other SES dpages. (in the manual page but not in --help)man
-z, --ALLshows the output of the --join option invoked twice, followed by the other SES dpages. (in the manual page but not in --help)man
-b, --byte1 B1some modifiable dpages may need byte 1 (i.e. the second byte) set. (in the manual page but not in --help)man
-C, --clear STRUsed to clear an element field in the Enclosure Control or Threshold Out dpage. (in the manual page but not in --help)man
-c, --controlwill send control information to the DEVICE via a SCSI SEND DIAGNOSTIC command. (in the manual page but not in --help)man
-d, --data Hpermits a string of comma separated (ASCII) hex bytes to be specified (limit 1024). (in the manual page but not in --help)man
-E, --eiioe A_FA_F is either the string 'auto' or 'force'. (in the manual page but not in --help)man
-e, --enumerateenumerate all known diagnostic page (dpage) names and SES elements that this utility recognizes plus the abbreviations accepted by this utility. (in the manual page but not in --help)man
-f, --filtercuts down on the amount of output from the Enclosure Status dpage and the Additional Element Status dpage. (in the manual page but not in --help)man
-h, --helpoutput the usage message then exit. (in the manual page but not in --help)man
-H, --hexIf the --get=STR option is given then output the value found (if any) in hexadecimal, with a leading "0x". (in the manual page but not in --help)man
-X, --inhex FNwhere FN is a filename. (in the manual page but not in --help)man
-i, --inner-hexthe outer levels of a status dpage are decoded and printed out but the innermost level(s) (e.g. the Element Status Descriptor) is output in hex. (in the manual page but not in --help)man
-j, --joingroup elements from the Element Descriptor, Enclosure Status and Additional Element Status dpages. (in the manual page but not in --help)man
-Q, --js-file JFNoutput is in JSON format and it is sent to a file named JFN. (in the manual page but not in --help)man
-l, --listThis option is equivalent to --enumerate. (in the manual page but not in --help)man
-M, --maskWhen modifying elements, the default action is a read (status element), mask, modify (based on --clear=STR or --set=STR) then write back as the control element. (in the manual page but not in --help)man
-m, --maxlen LENLEN is placed in the ALLOCATION LENGTH field of the SCSI RECEIVE DIAGNOSTIC RESULTS commands sent by the utility. (in the manual page but not in --help)man
-n, --nickname SENwhere SEN is the new Subenclosure Nickname. (in the manual page but not in --help)man
-N, --nickid SEIDwhere SEID is the Subenclosure identifier that the new Nickname (SEN) will be applied to. (in the manual page but not in --help)man
-F, --no-configthe Element status, Array status (obsolete), Element Descriptor, Additional element status and Threshold In dpages all depend on the Configuration dpage for decoding. (in the manual page but not in --help)man
-y, --no-timethis utility now issues a SCSI REPORT TIMESTAMP command just after an INQUIRY command at the start of its execution. (in the manual page but not in --help)man
-q, --quietthis suppresses the number of warnings and messages output. (in the manual page but not in --help)man
-r, --rawoutputs the chosen status dpage in ASCII hex in a format suitable for a later invocation using the --data= option. (in the manual page but not in --help)man
-R, --readonlyopen the DEVICE read-only (e.g. in Unix with the O_RDONLY flag). (in the manual page but not in --help)man
-S, --set STRUsed to set an element field in the Enclosure Control or Threshold Out dpage. (in the manual page but not in --help)man
-s, --statuswill fetch dpage from the DEVICE via a SCSI RECEIVE DIAGNOSTIC RESULTS command (or from --data=@FN). (in the manual page but not in --help)man
-v, --verboseincrease the level of verbosity. (in the manual page but not in --help)man
-V, --versionprint the version string and then exit. (in the manual page but not in --help)man
-w, --warnwarn about certain irregularities with warnings sent to stderr. (in the manual page but not in --help)man
Exit status (1) from the manual page
0it is successful

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.