1SCSI_READCAP(8) SG3_UTILS SCSI_READCAP(8)
2
3
4
6 scsi_readcap - do SCSI READ CAPACITY command on disks
7
9 scsi_readcap [--brief] [--help] [--long] [--verbose] DEVICE [DEVICE]*
10
12 This bash shell script calls the sg_readcap utility on each given
13 DEVICE. This will send a SCSI READ CAPACITY command to each DEVICE.
14
15 The default action of this script is to send the 10 byte cdb READ
16 CAPACITY(10) command to each DEVICE. If a response indicates the number
17 of blocks is greater than or equal to '2**32 - 1' then the READ CAPAC‐
18 ITY(16) is sent and its response is output.
19
21 Arguments to long options are mandatory for short options as well.
22
23 -b, --brief
24 shortens the output to two hexadecimal numbers, both prefixed by
25 '0x'. The first number is the number of blocks available and
26 the second is the size of each blocks in bytes (e.g. '0x12a19eb0
27 0x200'). If an error is detected '0x0 0x0' is output and the
28 script continues if there are more DEVICEs.
29
30 -h, --help
31 print out the usage message then exit.
32
33 -l, --long
34 the default is to send the READ CAPACITY(10) command (i.e. the
35 10 byte cdb variant). When this option is given the READ CAPAC‐
36 ITY(16) command is sent. The latter command yields more informa‐
37 tion in its response.
38
39 -v, --verbose
40 increase level or verbosity.
41
43 The exit status of this script is 0 when it is successful. Otherwise
44 the exit status is that of the last sg_readcap utility called. See the
45 sg3_utils(8) man page.
46
48 Written by D. Gilbert
49
51 Copyright © 2009-2013 Douglas Gilbert
52 This software is distributed under a FreeBSD license. There is NO war‐
53 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
54 POSE.
55
57 sg_readcap (sg3_utils)
58
59
60
61sg3_utils-1.36 May 2013 SCSI_READCAP(8)