Content-type: text/html; charset=UTF-8
Man page of SG_REP_DENSITY
SG_REP_DENSITY
Section: SG3_UTILS (8)
Updated: June 2023
Index
Return to Main Contents
NAME
sg_rep_density - send SCSI REPORT DENSITY SUPPORT command
SYNOPSIS
sg_rep_density
[--help] [--hex] [--inhex=FN] [--maxlen=LEN]
[--media] [--raw] [--readonly] [--typem]
[--verbose] [--version]
DEVICE
DESCRIPTION
Sends a SCSI REPORT DENSITY command to DEVICE and outputs the data
returned. This command is tape drive specific. This command is found in
the SSC-5 draft standard, revision 6 (ssc5r06.pdf). This command was
present in the SSC-2 standard (ANSI INCITS 380-2003).
By default this utility requests the density code descriptors supported by
the DEVICE (e.g. a tape drive) and decodes the response. If the
--typem option is given it fetches the medium type descriptors
supported by the DEVICE and decodes the response. When the
--media option is given the density code or medium type descriptors
supported by the media inside the DEVICE (e.g. a tape cartridge) are
fetched.
OPTIONS
Arguments to long options are mandatory for short options as well.
- -h, --help
-
output the usage message then exit.
- -H, --hex
-
output the response in hexadecimal to stdout. When used once the whole
response is output in ASCII hexadecimal, prefixed by an address (starting at
0) on each line. When used twice the whole response is output in hexadecimal
with no leading address (on each line).
Using this option three times will produce output that can be redirected to
a file and later given to another invocation using the --inhex=FN
option.
- -i, --inhex=FN
-
where FN is a file name whose contents are assumed to be ASCII
hexadecimal. If DEVICE is also given then DEVICE is ignored,
a warning is issued and the utility continues, decoding the file named
FN. See the "HEX, BINARY AND JSON FORMATS" section 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=LEN
-
where LEN is the (maximum) response length in bytes. It is placed in
the cdb's "allocation length" field. If not given (or LEN is zero)
then 8192 is used. The maximum allowed value of LEN is 65535.
- -M, --media
-
sets the MEDIA bit in the cdb which causes the density codes (or medium
types) supported by the tape cartridge in the drive to be placed in the
response. The default is to request the density codes (or medium types)
supported by the tape drive itself.
If there is no "medium" (e.g. tape cartridge) present in the drive the SCSI
command will fail with a "not ready" sense key.
- -r, --raw
-
output the SCSI response (i.e. the data-out buffer) in binary (to stdout)
unless the --inhex=FN option is given.
When used together with the --inhex=FN option then the contents of
FN are treated as binary (rather than hexadecimal).
- -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, --typem
-
sets the MEDIUM TYPE bit in the cdb which causes the medium types supported
by the tape drive (or tape cartridge) to be placed in the response. The
default is to request the density codes.
- -v, --verbose
-
increase the level of verbosity, (i.e. debug output).
- -V, --version
-
print the version string and then exit.
EXIT STATUS
The exit status of sg_rep_density is 0 when it is successful. Otherwise see
the sg3_utils(8) man page.
AUTHORS
Written by Douglas Gilbert.
REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>.
COPYRIGHT
Copyright © 2022-2023 Douglas Gilbert
This software is distributed under a BSD-2-Clause license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
sg3_utils(sg3_utils)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXIT STATUS
-
- AUTHORS
-
- REPORTING BUGS
-
- COPYRIGHT
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 04:00:44 GMT, August 02, 2023