{
    "mode": "man",
    "parameter": "sg_get_elem_status",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sg_get_elem_status/8/json",
    "generated": "2026-10-04T16:23:40Z",
    "synopsis": "sggetelemstatus  [--brief]  [--filter=FLT]  [--help]  [--hex]  [--inhex=FN] [--maxlen=LEN]\n[--raw] [--readonly] [--report-type=RT] [--starting=ELEM] [--verbose] [--version] DEVICE",
    "sections": {
        "NAME": {
            "content": "sggetelemstatus - send SCSI GET PHYSICAL ELEMENT STATUS command\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sggetelemstatus  [--brief]  [--filter=FLT]  [--help]  [--hex]  [--inhex=FN] [--maxlen=LEN]\n[--raw] [--readonly] [--report-type=RT] [--starting=ELEM] [--verbose] [--version] DEVICE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Send the SCSI GET PHYSICAL ELEMENT STATUS command to the DEVICE and output the response.  The\ncommand was introduced in (draft) SBC-4 revision 16.\n\nThe  default action is to decode the response into one physical element status descriptor per\nline then output a header and the status descriptors to stdout.  The amount of output can  be\nreduced by the --brief option.\n\nRather  than  send  this  SCSI command to DEVICE, if the --inhex=FN option is given, then the\ncontents of the file named FN are decoded as ASCII hex and then processed if it was  the  re‐\nsponse of this command.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Arguments to long options are mandatory for short options as well.\n",
            "subsections": [
                {
                    "name": "-b --brief",
                    "content": "tbd\n",
                    "flag": "-b",
                    "long": "--brief"
                },
                {
                    "name": "-f --filter",
                    "content": "where  FLT is placed in a two bit field called FILTER in the GET PHYSICAL ELEMENT STA‐\nTUS command. Only two values are defined for that field: 0 for  all  element  descrip‐\ntors; 1 for those element descriptors that are outside 'spec' or have depopulation in‐\nformation  to  report.  In  both cases the REPORT TYPE and STARTING ELEMENT fields may\nfurther restrict (reduce) the number of  element  descriptors  returned.  The  default\nvalue is zero.\n",
                    "flag": "-f",
                    "long": "--filter"
                },
                {
                    "name": "-h --help",
                    "content": "output the usage message then exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-H --hex",
                    "content": "output response to this command in ASCII hex.\n",
                    "flag": "-H",
                    "long": "--hex"
                },
                {
                    "name": "-i --inhex",
                    "content": "where FN is a function name whose contents are assumed to be ASCII hexadecimal. If DE‐\nVICE is also given then DEVICE is ignored, a warning is issued and the utility contin‐\nues,  decoding  the file named FN. See the \"FORMAT OF FILES CONTAINING ASCII HEX\" sec‐\ntion in the sg3utils manpage for more information. If the --raw option is also  given\nthen the contents of FN are treated as binary.\n",
                    "flag": "-i",
                    "long": "--inhex"
                },
                {
                    "name": "-m --maxlen",
                    "content": "where  LEN is the (maximum) response length in bytes. It is placed in the cdb's \"allo‐\ncation length\" field. If not given then 32 is used. 32 is enough  space  for  the  re‐\nsponse  header  only.   LEN  should be a multiple of 32 (e.g. 32, 64, and 96 are suit‐\nable).\n",
                    "flag": "-m",
                    "long": "--maxlen"
                },
                {
                    "name": "-r --raw",
                    "content": "output response in binary (to stdout) unless the --inhex=FN option is also  given.  In\nthat  case  the  input file name (FN) is decoded as binary (and the output is not in\nbinary).\n",
                    "flag": "-r",
                    "long": "--raw"
                },
                {
                    "name": "-R --readonly",
                    "content": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag).  The  default  is  to\nopen it read-write.\n",
                    "flag": "-R",
                    "long": "--readonly"
                },
                {
                    "name": "-t --report-type",
                    "content": "where  RT  will  be placed in the REPORT TYPE field of the GET PHYSICAL ELEMENT STATUS\ncommand. Currently only two values are defined: 0 for 'physical element'  and  1:  for\n'storage element'. The default value is 1 .\n",
                    "flag": "-t",
                    "long": "--report-type"
                },
                {
                    "name": "-s --starting",
                    "content": "where  ELEM  is  the  placed in the STARTING ELEMENT field of the GET PHYSICAL ELEMENT\nSTATUS command. Only physical elements with identifiers equal to or greater than  ELEM\nare  returned.  The default value is zero which while it isn't a valid element identi‐\nfier (since they must be non-zero) is given in an example in Annex L of SBC-4 revision\n17. So an ELEM of zero is assumed to be valid in this context.\n",
                    "flag": "-s",
                    "long": "--starting"
                },
                {
                    "name": "-v --verbose",
                    "content": "increase the level of verbosity, (i.e. debug output). Additional output caused by this\noption is sent to stderr.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "print the version string and then exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "The exit status of  sggetelemstatus  is  0  when  it  is  successful.  Otherwise  see  the\nsg3utils(8) man page.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Written by Douglas Gilbert.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to <dgilbert at interlog dot com>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2019 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_get_lba_status(8), sg3_utils(8)",
                    "content": "sg3utils-1.45                               August 2019                       SGGETELEMSTATUS(8)"
                }
            ]
        }
    },
    "summary": "sggetelemstatus - send SCSI GET PHYSICAL ELEMENT STATUS command",
    "flags": [
        {
            "flag": "-b",
            "long": "--brief",
            "arg": null,
            "description": "tbd"
        },
        {
            "flag": "-f",
            "long": "--filter",
            "arg": null,
            "description": "where FLT is placed in a two bit field called FILTER in the GET PHYSICAL ELEMENT STA‐ TUS command. Only two values are defined for that field: 0 for all element descrip‐ tors; 1 for those element descriptors that are outside 'spec' or have depopulation in‐ formation to report. In both cases the REPORT TYPE and STARTING ELEMENT fields may further restrict (reduce) the number of element descriptors returned. The default value is zero."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "output the usage message then exit."
        },
        {
            "flag": "-H",
            "long": "--hex",
            "arg": null,
            "description": "output response to this command in ASCII hex."
        },
        {
            "flag": "-i",
            "long": "--inhex",
            "arg": null,
            "description": "where FN is a function name whose contents are assumed to be ASCII hexadecimal. If DE‐ VICE is also given then DEVICE is ignored, a warning is issued and the utility contin‐ ues, decoding the file named FN. See the \"FORMAT OF FILES CONTAINING ASCII HEX\" sec‐ tion in the sg3utils manpage for more information. If the --raw option is also given then the contents of FN are treated as binary."
        },
        {
            "flag": "-m",
            "long": "--maxlen",
            "arg": null,
            "description": "where LEN is the (maximum) response length in bytes. It is placed in the cdb's \"allo‐ cation length\" field. If not given then 32 is used. 32 is enough space for the re‐ sponse header only. LEN should be a multiple of 32 (e.g. 32, 64, and 96 are suit‐ able)."
        },
        {
            "flag": "-r",
            "long": "--raw",
            "arg": null,
            "description": "output response in binary (to stdout) unless the --inhex=FN option is also given. In that case the input file name (FN) is decoded as binary (and the output is not in binary)."
        },
        {
            "flag": "-R",
            "long": "--readonly",
            "arg": null,
            "description": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag). The default is to open it read-write."
        },
        {
            "flag": "-t",
            "long": "--report-type",
            "arg": null,
            "description": "where RT will be placed in the REPORT TYPE field of the GET PHYSICAL ELEMENT STATUS command. Currently only two values are defined: 0 for 'physical element' and 1: for 'storage element'. The default value is 1 ."
        },
        {
            "flag": "-s",
            "long": "--starting",
            "arg": null,
            "description": "where ELEM is the placed in the STARTING ELEMENT field of the GET PHYSICAL ELEMENT STATUS command. Only physical elements with identifiers equal to or greater than ELEM are returned. The default value is zero which while it isn't a valid element identi‐ fier (since they must be non-zero) is given in an example in Annex L of SBC-4 revision 17. So an ELEM of zero is assumed to be valid in this context."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "increase the level of verbosity, (i.e. debug output). Additional output caused by this option is sent to stderr."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print the version string and then exit."
        }
    ],
    "examples": [],
    "see_also": []
}