OS Manuals

/usr/bin/sg_requests

SCSI utilities for Linux, Unix and Windows

From sg3-utils 1.49-r3 (enterprise-packages), captured 2026-11-08 by running sg_requests --help (exit 0). permalink

Usage: sg_requests [--desc] [--error] [--help] [--hex] [--maxlen=LEN]
                   [--num=NUM] [--number=NUM] [--progress] [--raw]
                   [--status] [--time] [--timeout=SE] [--verbose]
                   [--version] DEVICE
  where:
    --desc|-d         set flag for descriptor sense format
    --error|-e        change opcode to 0xff; to measure overhead
                      twice: skip ioctl call
    --help|-h         print out usage message
    --hex|-H          output in hexadecimal
    --maxlen=LEN|-m LEN    max response length (allocation length in cdb)
                           (def: 0 -> 252 bytes)
    --num=NUM|-n NUM  number of REQUEST SENSE commands to send (def: 1)
    --number=NUM      same action as '--num=NUM'
    --progress|-p     output a progress indication (percentage) if available
    --raw|-r          output in binary (to stdout)
    --status|-s       set exit status from parameter data (def: only set
                       exit status from autosense)
    --time|-t         time the transfer, calculate commands per second
    --verbose|-v      increase verbosity
    --version|-V      print version string and exit

Performs a SCSI REQUEST SENSE command
Options (14)
OptionDescriptionSource
--maxlen, -m LEN|-mmax response length (allocation length in cdb) (def: 0 -> 252 bytes)help + man
--num, -n NUM|-nperform NUM SCSI REQUEST SENSE commands, stopping when either NUM is reached or an error occurs.help + man
--number NUMsame action as '--num=NUM'help + man
-d, --descsets the DESC bit in the REQUEST SENSE SCSI cdb. (in the manual page but not in --help)man
-e, --errorwhen used once it changes the REQUEST SENSE opcode from 0x3 to 0xff which should be rejected by the DEVICE. (in the manual page but not in --help)man
-h, --helpoutput the usage message then exit. (in the manual page but not in --help)man
-H, --hexoutput response in ASCII hexadecimal. (in the manual page but not in --help)man
-p, --progressshow progress indication (a percentage) if available. (in the manual page but not in --help)man
-r, --rawoutput response in binary (to stdout). (in the manual page but not in --help)man
-s, --statusif the REQUEST SENSE command finished without error (as indicated by its SCSI status) then the contents of the parameter data are analysed as sense data and the exit status is set accordingly. (in the manual page but not in --help)man
-t, --timetime the SCSI REQUEST SENSE command(s) and calculate the average number of operations per second. (in the manual page but not in --help)man
-T, --timeout SEwhere SE is the command timeout of each TEST UNIT READY command. (in the manual page but not in --help)man
-v, --verboseincrease the level of verbosity, (i.e. debug output). (in the manual page but not in --help)man
-V, --versionprint the version string and then exit. (in the manual page but not in --help)man
Exit status (1) from the manual page
0it is successful

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.