OS Manuals

/usr/bin/sg_logs

SCSI utilities for Linux, Unix and Windows

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

Usage: sg_logs [-ALL] [--all] [--brief] [--control=PC] [--enumerate]
               [--exclude] [--filter=FL] [--full] [--help] [--hex]
               [--inhex=FN] [--json[=JO]] [--js_file=JFN] [--list]
               [--maxlen=LEN] [--name] [--no_inq] [--page=PG]
               [--paramp=PP] [--pcb] [--ppc] [--pdt=DT] [--raw]
               [--readonly] [--reset] [--select] [--sp] [--temperature]
               [--transport] [--undefined] [--vendor=VP] [--verbose]
               [--version] DEVICE
  where the main options are:
    --ALL|-A        fetch and decode all log pages and subpages
    --all|-a        fetch and decode all log pages, but not subpages; use
                    twice to fetch and decode all log pages and subpages
    --brief|-b      shorten the output of some log pages
    --enumerate|-e    enumerate known pages, ignore DEVICE. Sort order,
                      '-e': all by acronym; '-ee': non-vendor by acronym;
                      '-eee': all numerically; '-eeee': non-v numerically
    --filter=FL|-f FL    FL is parameter code to display (def: all);
                         with '-e' then FL>=0 enumerate that pdt + spc
                         FL=-1 all (default), FL=-2 spc only
    --full|-F       drill down in application client log page
    --help|-h       print usage message then exit. Use twice for more help
    --hex|-H        output response in hex (default: decode if known)
    --inhex=FN|-i FN    FN is a filename containing a log page in ASCII hex
                        or binary if --raw also given. --inhex=FN also accepted
    --in=FN|-i FN    same as --inhex=FN
    --json[=JO]|-j[=JO]    output in JSON instead of plain text
                           Use --json=? for JSON help
    --js-file=JFN|-J JFN    JFN is a filename to which JSON output is
                            written (def: stdout); truncates then writes
    --list|-l       list supported log pages; twice: list supported log
                    pages and subpages page; thrice: merge of both pages
    --page=PG|-p PG    PG is either log page acronym, PGN or PGN,SPGN
                       where (S)PGN is a (sub) page number
    --temperature|-t    decode temperature (log page 0xd or 0x2f)
    --transport|-T    decode transport (protocol specific port 0x18) page
    --vendor=VP|-M VP    vendor/product abbreviation [or number]
    --verbose|-v    increase verbosity

Performs a SCSI LOG SENSE (or LOG SELECT) command and decodes the response.
If only DEVICE is given then '-p sp' (supported pages) is assumed. Use
'-e' to see known pages and their acronyms. For more help use '-hh'.
Options (42)
OptionDescriptionSource
--filter, -f FL|-fFL is either a parameter code when DEVICE is given, or a peripheral device type (pdt) (or other) if --enumerate is given.help + man
--inhex FN|-iFN is a filename containing a log page in ASCII hex or binary if --raw also given.help
--in, -i FN|-iSame as --inhex=FN option.help + man
--json JO]|-j[=JOoutput in JSON instead of plain text Use --json=? for JSON helphelp
--js-file, -J JFN|-JJFN is a filename to which JSON output is written (def: stdout);help + man
--page, -p PG|-pPG is either log page acronym, PGN or PGN,SPGN where (S)PGN is a (sub) page numberhelp + man
--vendor, -M VP|-Mwhere VP is a vendor/manufacturer (e.g. "sea" for Seagate) or product (group) acronym (e.g. "lto5" for the 5th generation LTO (tape) consortium).help + man
-A, --ALLfetch and decode all the log pages and subpages supported by the DEVICE. (in the manual page but not in --help)man
-a, --alloutputs all the log pages supported by the DEVICE. (in the manual page but not in --help)man
-b, --briefshorten the amount of output for some log pages. (in the manual page but not in --help)man
-c, --control PCaccepts 0, 1, 2 or 3 for the PC argument: 0 : current threshold values 1 : current cumulative values 2 : default threshold values 3 : default cumulative values The default value is 1 (i.e. current… (in the manual page but not in --help)man
-e, --enumeratethis option is used to output information held in this utility's internal tables about known log pages including their name, acronym and fields. (in the manual page but not in --help)man
-E, --excludethis option excludes vendor specific pages and parameters from the output. (in the manual page but not in --help)man
-F, --fullthis option is only used in two situations: with the Application client (AC) log page and with the --ALL option. (in the manual page but not in --help)man
-h, --helpprint out the usage message then exit. (in the manual page but not in --help)man
-H, --hexThe default action is to decode known log page numbers (and subpage numbers) into text. (in the manual page but not in --help)man
-l, --listlists the names of the logs sense pages supported by this device. (in the manual page but not in --help)man
-m, --maxlen LENsets the "allocation length" field in the LOG SENSE cdb. (in the manual page but not in --help)man
-n, --namedecode some log pages into 'name=value' entries, one per line. (in the manual page but not in --help)man
-x, --no_inqsuppresses the output of information obtained from an initial call to the INQUIRY command for the standard response. (in the manual page but not in --help)man
-O, --oldSwitch to older style options. (in the manual page but not in --help)man
-P, --paramp PPPP is the parameter pointer value to place in a field of that name in the LOG SENSE cdb. (in the manual page but not in --help)man
-q, --pcbshow Parameter Control Byte settings (only relevant when log parameters being output in ASCII). (in the manual page but not in --help)man
-D, --pdt DTDT is the peripheral device type (PDT) that is used when it is not available from the DEVICE. (in the manual page but not in --help)man
-Q, --ppcsets the Parameter Pointer Control (PPC) bit in the LOG SENSE cdb. (in the manual page but not in --help)man
-r, --rawoutput the response in binary to stdout. (in the manual page but not in --help)man
-R, --readonlyopen the DEVICE read-only (e.g. in Unix with the O_RDONLY flag). (in the manual page but not in --help)man
-S, --selectuse a LOG SELECT command. (in the manual page but not in --help)man
-s, --spsets the Saving Parameters (SP) bit. (in the manual page but not in --help)man
-t, --temperatureoutputs the temperature. (in the manual page but not in --help)man
-T, --transportoutputs the transport ('Protocol specific port') log page. (in the manual page but not in --help)man
-u, --undefinedto see fields decoded, the --hex option cannot be used. (in the manual page but not in --help)man
-v, --verboseincrease level of verbosity. (in the manual page but not in --help)man
-V, --versionprint out version string then exit. (in the manual page but not in --help)man
-Llists the names of all logs sense pages and subpages supported by this DEVICE. (in the manual page but not in --help)man
-N, --newSwitch to the newer style options. (in the manual page but not in --help)man
-paramp PPPP is the parameter pointer value (in hex) to place in command. (in the manual page but not in --help)man
-pcbshow Parameter Control Byte settings (only relevant when log parameters being output in ASCII). (in the manual page but not in --help)man
-ppcsets the Parameter Pointer Control (PPC) bit. (in the manual page but not in --help)man
-selectuse a LOG SELECT command. (in the manual page but not in --help)man
-spsets the Saving Parameters (SP) bit. (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
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.