SG_SES - Online Linux Manual PageSection : 8
Updated : April 2009
Source : sg3_utils−1.27
Note : SG3_UTILS

NAMEsg_ses − send controls and fetch status from a SCSI Enclosure Services (SES) device

SYNOPSISsg_ses [−−byte1=B1] [−−control] [−−data=H,H...] [−−filter] [−−help] [−−hex] [−−inner−hex] [−−list] [−−page=PG] [−−raw] [−−status] [−−verbose] [−−version] DEVICE

DESCRIPTION Send controls to a SES device (via a SCSI SEND DIAGNOSTIC command) or fetches status (via a SCSI RECEIVE DIAGNOSTIC RESULTS command). The DEVICE should be a SES device which may be a dedicated enclosure services processor (INQUIRY peripheral device type 0xd) or attached to another type of SCSI device (e.g. a disk) in which case the EncServ bit set in its INQUIRY response. If no options are given (only the DEVICE argument) then all diagnostic pages supported by the device (including SES pages) are listed.

OPTIONSArguments to long options are mandatory for short options as well. The options are arranged in alphabetical order based on the long option name. −b, −−byte1=B1  some control pages need byte 1 (i.e. the second byte) of the cdb set. Only required in rare cases when the −−control option is also set. Default is 0; B1 is in decimal unless it is prefixed by '0x' or '0X' (or has a trailing 'h' or 'H'). −c, −−control  will send control information to the DEVICE via a SCSI SEND DIAGNOSTIC command. Cannot give both this option and −−status. The Enclosure control, String Out, Threshold Out, Array control (obsolete in SES−2) and Subenclosure String Out diagnostic pages can be set currently. −d, −−data=H,H...  permits a string of comma separated (ASCII) hex bytes to be specified (limit 512). A (single) space separated string of hex bytes is also allowed but the list needs to be in quotes. This allows the parameters to a control diagnostic page to be specified. The string given should not include the first 4 bytes (i.e. page code and length). See next entry for using stdin. −d, −−data=−  reads a data string from stdin. Spaces, tabs and line feeds additionally are permitted as separators. −f, −−filter  cuts down on the amount of output from the enclosure status diagnostic page. When this option is given, any line which has all its binary flags cleared (i.e. 0) is filtered out (i.e. ignored). If a line has some other value on it (e.g. a temperature) then it is output. −h, −−help  output the usage message then exit. −H, −−hex  output the response in hexadecimal. −i, −−inner−hex  the outer levels of a status diagnostic page are decoded and printed out but the innermost level (e.g. the element status descriptor) is output in hex. Implemented for the more complex diagnostic pages. −l, −−list  list all known diagnostic page names and SES elements. DEVICE is ignored and utility exits. −p, −−page=PG  where PG is a page code. Assumed to be in decimal unless prefixed by 0x for hex. Valid range is 0 to 255 (0x0 to 0xff) inclusive. Default is page_code 0 (i.e. "Supported diagnostic pages"). −r, −−raw  outputs the chosen status page in (ASCII) hex in a format suitable for a later invocation using the −−data= option. A status diagnostic page less its first 4 bytes (page code and length) is output. When used twice (e.g. −rr) outputs full diagnostic page in binary to stdout. −s, −−status  will fetch status diagnostic page from the DEVICE via a SCSI RECEIVE DIAGNOSTIC RESULTS command. If this option is not given and −−control is not given then −−status is assumed. −v, −−verbose  increase the level of verbosity, (i.e. debug output). −V, −−version  print the version string and then exit.

NOTESCurrently all status pages, control pages and element types defined in SES−2 revision 17 (14th May 2007) are decoded. This utility can be used to fetch arbitrary (i.e. non SES) diagnostic pages (using the SCSI READ DIAGNOSTIC command). To this end the −−page=PG and −−hex options would be appropriate. Arbitrary diagnostic pages can be sent to a device with the sg_senddiag utility. There is a related command set called SAF−TE (SCSI attached fault−tolerant enclosure) for enclosure (including RAID) status and control. SCSI devices that support SAF−TE report "Processor" peripheral device type (0x3) in their INQUIRY response. See the sg_safte utility in this package or safte−monitor on the internet.

EXAMPLESTo view the supported pages:
   sg_ses /dev/sda
To view the configuration page:
   sg_ses −−page=1 /dev/sda
To view the status page:
   sg_ses −−page=2 /dev/sda
Changing a temperature threshold is possible, if a little awkward. The current thresholds can be shown with:
   sg_ses −−page=5 /dev/sda
The threshold to be changed can be chosen. Then output the threshold page in hex (suitable for editing) with:
   sg_ses −−page=5 −−raw /dev/sda > t
Then with the aid of the SES−2 document (in revision 9: section 6.1.8) use your favourite editor to change t. The change can be sent to the device with:
   sg_ses −−control −−page=5 −−data=− /dev/sda < t
If the above is successful, the threshold should have been changed. To check try:
   sg_ses −−page=5 /dev/sda
again.

EXIT STATUSThe exit status of sg_ses is 0 when it is successful. Otherwise see the sg3_utils(8) man page.

AUTHORSWritten by Douglas Gilbert.

REPORTING BUGSReport bugs to <dgilbert at interlog dot com>.

COPYRIGHTCopyright © 2004−2009 Douglas Gilbert
This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSOsg_inq, sg_safte, sg_senddiag (in sg3_utils package); safte−monitor (internet)
0
Johanes Gumabo
Data Size   :   21,563 byte
man-sg_ses.8Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 204,468
Visitor ID   :     :  
Visitor IP   :   3.133.148.222   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.