{
    "mode": "man",
    "parameter": "SG_SAFTE",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/SG_SAFTE/8/json",
    "generated": "2026-10-06T12:02:47Z",
    "synopsis": "sgsafte  [--config]  [--devstatus]  [--encstatus]  [--flags] [--help] [--hex] [--insertions]\n[--raw] [--usage] [--verbose] [--version] DEVICE",
    "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": "",
            "subsections": [
                {
                    "name": "sg_inq, sg_ses (in sg3_utils package); safte-monitor (internet)",
                    "content": "sg3utils-1.43                               April 2016                                  SGSAFTE(8)"
                }
            ]
        }
    },
    "summary": "sgsafte - access SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device",
    "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": []
}