1SG_GET_ELEM_STATUS(8) SG3_UTILS SG_GET_ELEM_STATUS(8)
2
3
4
6 sg_get_elem_status - send SCSI GET PHYSICAL ELEMENT STATUS command
7
9 sg_get_elem_status [--brief] [--filter=FLT] [--help] [--hex]
10 [--inhex=FN] [--maxlen=LEN] [--raw] [--readonly] [--report-type=RT]
11 [--starting=ELEM] [--verbose] [--version] DEVICE
12
14 Send the SCSI GET PHYSICAL ELEMENT STATUS command to the DEVICE and
15 output the response. The command was introduced in (draft) SBC-4 revi‐
16 sion 16.
17
18 The default action is to decode the response into one physical element
19 status descriptor per line then output a header and the status descrip‐
20 tors to stdout. The amount of output can be reduced by the --brief
21 option.
22
23 Rather than send this SCSI command to DEVICE, if the --inhex=FN option
24 is given, then the contents of the file named FN are decoded as ASCII
25 hex and then processed if it was the response of this command.
26
28 Arguments to long options are mandatory for short options as well.
29
30 -b, --brief
31 tbd
32
33 -f, --filter=FLT
34 where FLT is placed in a two bit field called FILTER in the GET
35 PHYSICAL ELEMENT STATUS command. Only two values are defined for
36 that field: 0 for all element descriptors; 1 for those element
37 descriptors that are outside 'spec' or have depopulation infor‐
38 mation to report. In both cases the REPORT TYPE and STARTING
39 ELEMENT fields may further restrict (reduce) the number of ele‐
40 ment descriptors returned. The default value is zero.
41
42 -h, --help
43 output the usage message then exit.
44
45 -H, --hex
46 output response to this command in ASCII hex.
47
48 -i, --inhex=FN
49 where FN is a function name whose contents are assumed to be
50 ASCII hexadecimal. If DEVICE is also given then DEVICE is
51 ignored, a warning is issued and the utility continues, decoding
52 the file named FN. See the "FORMAT OF FILES CONTAINING ASCII
53 HEX" section in the sg3_utils manpage for more information. If
54 the --raw option is also given then the contents of FN are
55 treated as binary.
56
57 -m, --maxlen=LEN
58 where LEN is the (maximum) response length in bytes. It is
59 placed in the cdb's "allocation length" field. If not given then
60 32 is used. 32 is enough space for the response header only.
61 LEN should be a multiple of 32 (e.g. 32, 64, and 96 are suit‐
62 able).
63
64 -r, --raw
65 output response in binary (to stdout) unless the --inhex=FN
66 option is also given. In that case the input file name (FN) is
67 decoded as binary (and the output is _not_ in binary).
68
69 -R, --readonly
70 open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag).
71 The default is to open it read-write.
72
73 -t, --report-type=RT
74 where RT will be placed in the REPORT TYPE field of the GET
75 PHYSICAL ELEMENT STATUS command. Currently only two values are
76 defined: 0 for 'physical element' and 1: for 'storage element'.
77 The default value is 1 .
78
79 -s, --starting=ELEM
80 where ELEM is the placed in the STARTING ELEMENT field of the
81 GET PHYSICAL ELEMENT STATUS command. Only physical elements with
82 identifiers equal to or greater than ELEM are returned. The
83 default value is zero which while it isn't a valid element iden‐
84 tifier (since they must be non-zero) is given in an example in
85 Annex L of SBC-4 revision 17. So an ELEM of zero is assumed to
86 be valid in this context.
87
88 -v, --verbose
89 increase the level of verbosity, (i.e. debug output). Additional
90 output caused by this option is sent to stderr.
91
92 -V, --version
93 print the version string and then exit.
94
96 The exit status of sg_get_elem_status is 0 when it is successful. Oth‐
97 erwise see the sg3_utils(8) man page.
98
100 Written by Douglas Gilbert.
101
103 Report bugs to <dgilbert at interlog dot com>.
104
106 Copyright © 2019 Douglas Gilbert
107 This software is distributed under a FreeBSD license. There is NO war‐
108 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
109 POSE.
110
112 sg_get_lba_status(8), sg3_utils(8)
113
114
115
116sg3_utils-1.45 August 2019 SG_GET_ELEM_STATUS(8)