{
    "content": [
        {
            "type": "text",
            "text": "# sg_safte (man)\n\n## NAME\n\nsgsafte - access SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device\n\n## SYNOPSIS\n\nsgsafte  [--config]  [--devstatus]  [--encstatus]  [--flags] [--help] [--hex] [--insertions]\n[--raw] [--usage] [--verbose] [--version] DEVICE\n\n## DESCRIPTION\n\nFetches enclosure status (via a SCSI READ BUFFER command).  The DEVICE should be a SAF-TE de‐\nvice  which  may  be  a  storage  array  controller (INQUIRY peripheral device type 0xc) or a\ngeneric processor device (INQUIRY peripheral device type 0x3).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **NOTES**\n- **EXAMPLES**\n- **EXIT STATUS**\n- **AUTHORS**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "sg_safte",
        "section": "",
        "mode": "man",
        "summary": "sgsafte - access SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device",
        "synopsis": "sgsafte  [--config]  [--devstatus]  [--encstatus]  [--flags] [--help] [--hex] [--insertions]\n[--raw] [--usage] [--verbose] [--version] DEVICE",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-c",
                "long": "--config",
                "arg": null,
                "description": "will issues a Read Enclosure Configuration ®(READ BUFFER ID 0) cdb to the device, which returns a list of the enclosure hardware resources."
            },
            {
                "flag": "-d",
                "long": "--devstatus",
                "arg": null,
                "description": "will issue a Read Device Slot Status ®(READ BUFFER ID 4) cdb to the device, which re‐ turns information about the current state of each drive or slot."
            },
            {
                "flag": "-s",
                "long": "--encstatus",
                "arg": null,
                "description": "will issue a Read Enclosure Status ®(READ BUFFER ID 1) cdb to the device, which re‐ turns the operational state of the components."
            },
            {
                "flag": "-f",
                "long": "--flags",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "output the usage message then exit."
            },
            {
                "flag": "-H",
                "long": "--hex",
                "arg": null,
                "description": "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 bufferid=0). This should be the enclosure configuration. If used twice (or more often), the response to subsequent READ BUFFER commands is output."
            },
            {
                "flag": "-i",
                "long": "--insertions",
                "arg": null,
                "description": "will issue a Read Device Insertions ®(READ BUFFER ID 3) cdb to the device, which re‐ turns information about the number of times devices have been inserted whilst the RAID system was powered on."
            },
            {
                "flag": "-r",
                "long": "--raw",
                "arg": null,
                "description": "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 bufferid=0). This should be the enclosure configuration. If used twice (or more often), the response to subsequent READ BUFFER commands is output."
            },
            {
                "flag": "-u",
                "long": "--usage",
                "arg": null,
                "description": "will issue a Read Usage Statistics ®(READ BUFFER ID 2) cdb to the device, which re‐ turns the information on total usage time and number of power-on cycles of the RAID device."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "increase the level of verbosity, (i.e. debug output)."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "print the version string and then exit."
            }
        ],
        "examples": [
            "To view the configuration:",
            "sgsafte /dev/sg1",
            "To view the device slot status:",
            "sgsafte --devstatus /dev/sg1"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-c --config",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-d --devstatus",
                        "lines": 3,
                        "flag": "-d",
                        "long": "--devstatus"
                    },
                    {
                        "name": "-s --encstatus",
                        "lines": 3,
                        "flag": "-s",
                        "long": "--encstatus"
                    },
                    {
                        "name": "-f --flags",
                        "lines": 3,
                        "flag": "-f",
                        "long": "--flags"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "lines": 5,
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-i --insertions",
                        "lines": 4,
                        "flag": "-i",
                        "long": "--insertions"
                    },
                    {
                        "name": "-r --raw",
                        "lines": 5,
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-u --usage",
                        "lines": 4,
                        "flag": "-u",
                        "long": "--usage"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sgsafte - access SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "sgsafte  [--config]  [--devstatus]  [--encstatus]  [--flags] [--help] [--hex] [--insertions]\n[--raw] [--usage] [--verbose] [--version] DEVICE\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Fetches enclosure status (via a SCSI READ BUFFER command).  The DEVICE should be a SAF-TE de‐\nvice  which  may  be  a  storage  array  controller (INQUIRY peripheral device type 0xc) or a\ngeneric processor device (INQUIRY peripheral device type 0x3).\n\nIf no options are given (only the DEVICE argument) then the overall enclosure status  as  re‐\nported by the option --config ®is reported.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Arguments  to long options are mandatory for short options as well.  The options are arranged\nin alphabetical order based on the long option name.\n",
                "subsections": [
                    {
                        "name": "-c --config",
                        "content": "will issues a Read Enclosure Configuration ®(READ BUFFER ID  0)  cdb  to  the  device,\nwhich returns a list of the enclosure hardware resources.\n",
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-d --devstatus",
                        "content": "will  issue a Read Device Slot Status ®(READ BUFFER ID 4) cdb to the device, which re‐\nturns information about the current state of each drive or slot.\n",
                        "flag": "-d",
                        "long": "--devstatus"
                    },
                    {
                        "name": "-s --encstatus",
                        "content": "will issue a Read Enclosure Status ®(READ BUFFER ID 1) cdb to the  device,  which  re‐\nturns the operational state of the components.\n",
                        "flag": "-s",
                        "long": "--encstatus"
                    },
                    {
                        "name": "-f --flags",
                        "content": "will  issue  a Read Global Flags ®(READ BUFFER ID 5) cdb to the device, which read the\nmost recent state of the global flags of the RAID processor device.\n",
                        "flag": "-f",
                        "long": "--flags"
                    },
                    {
                        "name": "-h --help",
                        "content": "output the usage message then exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "content": "output the response to a READ BUFFER command in ASCII hex to  stdout.  If  used  once,\noutput  the  response  to  the first READ BUFFER command (i.e. with bufferid=0). This\nshould be the enclosure configuration. If used twice (or more often), the response  to\nsubsequent READ BUFFER commands is output.\n",
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-i --insertions",
                        "content": "will  issue  a Read Device Insertions ®(READ BUFFER ID 3) cdb to the device, which re‐\nturns information about the number of times devices have been inserted whilst the RAID\nsystem was powered on.\n",
                        "flag": "-i",
                        "long": "--insertions"
                    },
                    {
                        "name": "-r --raw",
                        "content": "output the response to a READ BUFFER command in binary to stdout. If used once, output\nthe response to the first READ BUFFER command (i.e. with bufferid=0). This should  be\nthe enclosure configuration. If used twice (or more often), the response to subsequent\nREAD BUFFER commands is output.\n",
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-u --usage",
                        "content": "will issue a Read Usage Statistics ®(READ BUFFER ID 2) cdb to the  device,  which  re‐\nturns  the  information  on total usage time and number of power-on cycles of the RAID\ndevice.\n",
                        "flag": "-u",
                        "long": "--usage"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "increase the level of verbosity, (i.e. debug output).\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "content": "print the version string and then exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "NOTES": {
                "content": "This implementation is based on the intermediate review document  dated  19970414  and  named\n\"SR041497.pdf\". So it is quite old. Intel and nStor are the authors. Intel have a zip archive\ncontaining this and related documents in the \"SAF-TE: SCSI Accessed Fault Tolerant Enclosures\nInterface Specification\" section of this page:\n\nhttp://www.intel.com/content/www/us/en/servers/ipmi/ipmi-technical-resources.html\n\nSimilar  functionality is provided by SPC-4 SCSI Enclosure Services (SES) devices (Peripheral\ndevice type 0xd), which can be queried with the sgses utility.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To view the configuration:\n\nsgsafte /dev/sg1\n\nTo view the device slot status:\n\nsgsafte --devstatus /dev/sg1\n",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "The exit status of sgsafte is 0 when it is successful. Otherwise see  the  sg3utils(8)  man\npage.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Written by Hannes Reinecke and Douglas Gilbert.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs to <dgilbert at interlog dot com>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2004-2016 Hannes Reinecke and Douglas Gilbert\nThis software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "sginq, sgses (in sg3utils package); safte-monitor (internet)\n\n\n\nsg3utils-1.43                               April 2016                                  SGSAFTE(8)",
                "subsections": []
            }
        }
    }
}