Scroll to navigation

SG_REP_DENSITY(8) SG3_UTILS SG_REP_DENSITY(8)

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.

output the usage message then exit.
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.
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.
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.
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.
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).
open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag). The default is to open it read-write.
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.
increase the level of verbosity, (i.e. debug output).
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)

June 2023 sg3_utils-1.48