Usage: sg_modes [--all] [--control=PC] [--dbd] [--dbout] [--examine]
[--flexible] [--help] [--hex] [--list] [--llbaa]
[--maxlen=LEN] [--multiple] [--page=PG[,SPG]] [--raw] [-R]
[--readwrite] [--six] [--verbose] [--version] [DEVICE]
where:
--all|-a get all mode pages supported by device
use twice to get all mode pages and subpages
--control=PC|-c PC page control (if not given: 0)
0: current, 1: changeable,
2: (manufacturer's) defaults, 3: saved
--dbd|-d disable block descriptors (DBD field in cdb)
--dbout|-D disable block descriptor output
--examine|-e examine pages # 0 through to 0x3e, note if found
--flexible|-f be flexible, cope with MODE SENSE 6/10 response mixup
--help|-h print usage message then exit
--hex|-H output full response in hex
use twice to output page number and header in hex
--list|-l list common page codes for device peripheral type,
if no device given then assume disk type
--llbaa|-L set Long LBA Accepted (LLBAA field in mode sense (10) cdb)
--maxlen=LEN|-m LEN max response length (allocation length in cdb)
(def: 0 -> 4096 or 252 (for MODE SENSE 6) bytes)
--multiple|-M output multiple page controls rather`than one
--page=PG|-p PG page code to fetch (def: 63). May be acronym
--page=PG,SPG|-p PG,SPG
page code and subpage code to fetch (defs: 63,0)
--raw|-r output response in binary to stdout
-R mode page response to stdout, a byte per line in ASCII
hex (same result as '--raw --raw')
--readwrite|-w open DEVICE read-write (def: open read-only)
--six|-6|-s use MODE SENSE(6), by default uses MODE SENSE(10)
--verbose|-v increase verbosity
--old|-O use old interface (use as first option)
--version|-V output version string then exit
Performs a SCSI MODE SENSE (10 or 6) command. To access and possibly change
mode page fields see the sdparm utility.
Options (24)
| Option | Description | Source |
|---|
--control, -c PC|-c | page control (if not given: 0) 0: current, 1: changeable, 2: (manufacturer's) defaults, 3: saved | help + man |
--maxlen, -m LEN|-m | max response length (allocation length in cdb) (def: 0 -> 4096 or 252 (for MODE SENSE 6) bytes) | help + man |
--page, -p PG|-p | page code to fetch (def: 63). | help + man |
-R | mode page response to stdout, a byte per line in ASCII hex (same result as '--raw --raw') | help + man |
-a, --all | output all the mode pages reported by the DEVICE. (in the manual page but not in --help) | man |
-A, --ALL | same meaning as using the --all option twice. (in the manual page but not in --help) | man |
-d, --dbd | disable block descriptors. (in the manual page but not in --help) | man |
-D, --dbout | disable outputting block descriptors. (in the manual page but not in --help) | man |
-e, --examine | if the --page=PG[,SPG] option is not given, examine each mode page in the range 0 through to 62 (inclusive). (in the manual page but not in --help) | man |
-f, --flexible | Some devices, bridges and/or drivers attempt crude translations between MODE SENSE 6 and 10 byte commands without correcting the response. (in the manual page but not in --help) | man |
-h, --help | print out the usage message then exit. (in the manual page but not in --help) | man |
-H, --hex | Since this utility shows the structure of a MODE SENSE command response (i.e. its parameter header, zero or more block descriptors followed by zero or more mode pages) but outputs most of the… (in the manual page but not in --help) | man |
-l, --list | lists all common page and subpage codes and their names that are found in the command set that matches the peripheral type of the given DEVICE. (in the manual page but not in --help) | man |
-L, --llbaa | set the Long LBA Accepted (LLBAA) bit in the MODE SENSE (10) cdb. (in the manual page but not in --help) | man |
-M, --multiple | for each mode page (and mode subpage), fetch all available page controls. (in the manual page but not in --help) | man |
-O, --old | Switch to older style options. (in the manual page but not in --help) | man |
-r, --raw | output the response in binary to stdout. (in the manual page but not in --help) | man |
-w, --readwrite | open DEVICE in "read-write" mode. (in the manual page but not in --help) | man |
-6, -s, --six | by default this utility sends a 10 byte MODE SENSE command to the DEVICE. (in the manual page but not in --help) | man |
-v, --verbose | increase level of verbosity. (in the manual page but not in --help) | man |
-V, --version | print out version string then exit. (in the manual page but not in --help) | man |
-N, --new | Switch to the newer style options. (in the manual page but not in --help) | man |
-subp SPG | sub page code to fetch. (in the manual page but not in --help) | man |
-? | output usage message then exit. (in the manual page but not in --help) | man |
Exit status (1) from the manual page
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.