# SG_GET_ELEM_STATUS - send SCSI GET PHYSICAL ELEMENT STATUS command - man(8) - [phpMan]

[_SG_GET_ELEM_STATUS_(8)](https://www.chedong.com/phpMan.php/man/SGGETELEMSTATUS/8/markdown)                         SG3_UTILS                        [_SG_GET_ELEM_STATUS_(8)](https://www.chedong.com/phpMan.php/man/SGGETELEMSTATUS/8/markdown)

## NAME
       sg_get_elem_status - send SCSI GET PHYSICAL ELEMENT STATUS command

## SYNOPSIS
       **sg_get_elem_status  **[_--brief_]  [_--filter=FLT_]  [_--help_]  [_--hex_]  [_--inhex=FN_] [_--maxlen=LEN_]
       [_--raw_] [_--readonly_] [_--report-type=RT_] [_--starting=ELEM_] [_--verbose_] [_--version_] _DEVICE_

## DESCRIPTION
       Send the SCSI GET PHYSICAL ELEMENT STATUS command to the _DEVICE_ and output the response.  The
       command was introduced in (draft) SBC-4 revision 16.

       The  default action is to decode the response into one physical element status descriptor per
       line then output a header and the status descriptors to stdout.  The amount of output can  be
       reduced by the _--brief_ option.

       Rather  than  send  this  SCSI command to _DEVICE_, if the _--inhex=FN_ option is given, then the
       contents of the file named _FN_ are decoded as ASCII hex and then processed if it was  the  re‐
       sponse of this command.

## OPTIONS
       Arguments to long options are mandatory for short options as well.

### -b --brief
              tbd

### -f --filter
              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.

### -h --help
              output the usage message then exit.

### -H --hex
              output response to this command in ASCII hex.

### -i --inhex
              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 sg3_utils manpage for more information. If the _--raw_ option is also  given
              then the contents of _FN_ are treated as binary.

### -m --maxlen
              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).

### -r --raw
              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).

### -R --readonly
              open the _DEVICE_ read-only (e.g. in Unix with the O_RDONLY flag).  The  default  is  to
              open it read-write.

### -t --report-type
              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 .

### -s --starting
              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.

### -v --verbose
              increase the level of verbosity, (i.e. debug output). Additional output caused by this
              option is sent to stderr.

### -V --version
              print the version string and then exit.

## EXIT STATUS
       The exit status of  sg_get_elem_status  is  0  when  it  is  successful.  Otherwise  see  the
       [sg3_utils(8)](https://www.chedong.com/phpMan.php/man/sg3utils/8/markdown) man page.

## AUTHORS
       Written by Douglas Gilbert.

## REPORTING BUGS
       Report bugs to <dgilbert at interlog dot com>.

## COPYRIGHT
       Copyright © 2019 Douglas Gilbert
       This software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐
       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## SEE ALSO
### [sg_get_lba_status(8)](https://www.chedong.com/phpMan.php/man/sggetlbastatus/8/markdown), [sg3_utils(8)](https://www.chedong.com/phpMan.php/man/sg3utils/8/markdown)

sg3_utils-1.45                               August 2019                       [_SG_GET_ELEM_STATUS_(8)](https://www.chedong.com/phpMan.php/man/SGGETELEMSTATUS/8/markdown)
