SG\_SAFTE(8) SG3\_UTILS SG\_SAFTE(8)

# [NAME](#NAME)

sg\_safte - access SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device

# [SYNOPSIS](#SYNOPSIS)

**sg\_safte** \[*--config*] \[*--devstatus*] \[*--encstatus*] \[*--flags*] \[*--help*] \[*--hex*] \[*--insertions*] \[*--raw*] \[*--usage*] \[*--verbose*] \[*--version*] *DEVICE*

# [DESCRIPTION](#DESCRIPTION)

Fetches enclosure status (via a SCSI READ BUFFER command). The *DEVICE* should be a SAF-TE device which may be a storage array controller (INQUIRY peripheral device type 0xc) or a generic processor device (INQUIRY peripheral device type 0x3).

If no options are given (only the *DEVICE* argument) then the overall enclosure status as reported by the option *--config* is reported.

# [OPTIONS](#OPTIONS)

Arguments to long options are mandatory for short options as well. The options are arranged in alphabetical order based on the long option name.

[**-c**, **--config**](#c)

will issues a *Read Enclosure Configuration* (READ BUFFER ID 0) cdb to the device, which returns a list of the enclosure hardware resources.

[**-d**, **--devstatus**](#d)

will issue a *Read Device Slot Status* (READ BUFFER ID 4) cdb to the device, which returns information about the current state of each drive or slot.

[**-s**, **--encstatus**](#s)

will issue a *Read Enclosure Status* (READ BUFFER ID 1) cdb to the device, which returns the operational state of the components.

[**-f**, **--flags**](#f)

will issue a *Read Global Flags* (READ BUFFER ID 5) cdb to the device, which read the most recent state of the global flags of the RAID processor device.

[**-h**, **--help**](#h)

output the usage message then exit.

[**-H**, **--hex**](#H)

output the response to a READ BUFFER command in ASCII hex to stdout. If used once, output the response to the first READ BUFFER command (i.e. with buffer\_id=0). This should be the enclosure configuration. If used twice (or more often), the response to subsequent READ BUFFER commands is output.

[**-i**, **--insertions**](#i)

will issue a *Read Device Insertions* (READ BUFFER ID 3) cdb to the device, which returns information about the number of times devices have been inserted whilst the RAID system was powered on.

[**-r**, **--raw**](#r)

output the response to a READ BUFFER command in binary to stdout. If used once, output the response to the first READ BUFFER command (i.e. with buffer\_id=0). This should be the enclosure configuration. If used twice (or more often), the response to subsequent READ BUFFER commands is output.

[**-u**, **--usage**](#u)

will issue a *Read Usage Statistics* (READ BUFFER ID 2) cdb to the device, which returns the information on total usage time and number of power-on cycles of the RAID device.

[**-v**, **--verbose**](#v)

increase the level of verbosity, (i.e. debug output).

[**-V**, **--version**](#V)

print the version string and then exit.

# [NOTES](#NOTES)

This implementation is based on the intermediate review document dated 19970414 and named "SR041497.pdf". So it is quite old. Intel and nStor are the authors. Intel have a zip archive containing this and related documents in the "SAF-TE: SCSI Accessed Fault Tolerant Enclosures Interface Specification" section of this page:

https://www.intel.com/content/www/us/en/servers/ipmi/ipmi-technical-resources.html

Similar functionality is provided by SPC-4 SCSI Enclosure Services (SES) devices (Peripheral device type 0xd), which can be queried with the sg\_ses utility.

# [EXAMPLES](#EXAMPLES)

To view the configuration:

sg\_safte /dev/sg1

To view the device slot status:

sg\_safte --devstatus /dev/sg1

# [EXIT STATUS](#EXIT_STATUS)

The exit status of sg\_safte is 0 when it is successful. Otherwise see the [sg3\_utils(8)](/man/enterprise-packages/sg3-utils/sg3_utils.8) man page.

# [AUTHORS](#AUTHORS)

Written by Hannes Reinecke and Douglas Gilbert.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;dgilbert at interlog dot com&gt;.

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2004-2016 Hannes Reinecke and Douglas Gilbert  
This software is distributed under a BSD-2-Clause license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# [SEE ALSO](#SEE_ALSO)

**sg\_inq, sg\_ses (in sg3\_utils package); safte-monitor (internet)**

April 2016 sg3\_utils-1.43

---

Document: sg_safte(8) from sg3-utils 1.49-r3 (Chainguard OS)
Source: https://github.com/doug-gilbert/sg3_utils.git
