SCSI_LOGGING_LEVEL(8)
π SCSI_LOGGING_LEVEL(8) π
β¨ NAME β¨
okay so this is scsi_logging_level π
it's the tool that lets you peek at and tweak the Linux SCSI subsystem's logging levels π₯
π SYNOPSIS π
scsi_logging_level [--all=LEV] [--create] [--error=LEV] [--get] [--help]
[--highlevel=LEV] [--hlcomplete=LEV] [--hlqueue=LEV] [--ioctl=LEV]
[--llcomplete=LEV] [--llqueue=LEV] [--lowlevel=LEV] [--midlevel=LEV]
[--mlcomplete=LEV] [--mlqueue=LEV] [--scan=LEV] [--set] [--timeout=LEV]
[--version]
πΈ DESCRIPTION πΈ
bestie, this is a bash shell script π and it's giving full access to the Linux SCSI subsystem logging level. you can check what the current values are (try --get) or change them (try --set) π heads up, you'll usually need superuser permissions to set the logging level π
one of --create, --get or --set is required, and you can only pick one of them per run. no greedy mode π€
π¦ OPTIONS π¦
okay so the long options need their arguments too, same as the short ones π«Ά
-a,--all=LEVβ slapLEVonto every single SCSI_LOG field π₯-c,--createβ your options get parsed and stored in internal fields so you can see them, but the logging levels inside the Linux kernel stay exactly the same π§-E,--error=LEVβ dropsLEVinto the SCSI_LOG_ERROR field π-g,--getβ grabs the current SCSI logging levels from the Linux kernel and shows them to you β¨-h,--helpβ prints the usage message and then bounces π-H,--highlevel=LEVβ putsLEVinto both the SCSI_LOG_HLQUEUE and SCSI_LOG_HLCOMPLETE fields π--hlcomplete=LEVβ putsLEVinto the SCSI_LOG_HLCOMPLETE field, just that one π--hlqueue=LEVβ putsLEVinto the SCSI_LOG_HLQUEUE field π-I,--ioctl=LEVβ putsLEVinto the SCSI_LOG_IOCTL field π--llcomplete=LEVβ putsLEVinto the SCSI_LOG_LLCOMPLETE field π¦--llqueue=LEVβ putsLEVinto the SCSI_LOG_LLQUEUE field π§-L,--lowlevel=LEVβ putsLEVinto both the SCSI_LOG_LLQUEUE and SCSI_LOG_LLCOMPLETE fields π-M,--midlevel=LEVβ putsLEVinto both the SCSI_LOG_MLQUEUE and SCSI_LOG_MLCOMPLETE fields π«Ά--mlcomplete=LEVβ putsLEVinto the SCSI_LOG_MLCOMPLETE field πΈ--mlqueue=LEVβ putsLEVinto the SCSI_LOG_MLQUEUE field β-S,--scan=LEVβ putsLEVinto the SCSI_LOG_SCAN field π₯-s,--setβ takes whatever fields you specified in this command and tries to apply them to the Linux SCSI subsystem logging levels. superuser perms are usually needed for this too π-T,--timeout=LEVβ putsLEVinto the SCSI_LOG_TIMEOUT field π-v,--versionβ shows the version info and then exits π
π NOTES π
the --get and --set options talk to the /proc/sys/dev/scsi/logging_level pseudo file π
π EXIT STATUS π
if everything goes well, the exit status is 0 π₯° literally any other number means something went wrong π
π EXAMPLES π
this one sets SCSI_LOG_ERROR to level 5 in the Linux kernel. you need root for it π
scsi_logging_level -s -E 5
okay so the Linux sg driver uses SCSI_LOG_TIMEOUT for its logging, and it does this so it doesn't mess with the other SCSI subsystem upper level drivers (ULDs), which are probably running at the same time π«Ά if you want the full debugging and trace from the sg driver, use:
scsi_logging_level -s -T 7
the sg driver output from that ends up in the system logs (e.g. /var/log/syslog) π to get less output, pick a number lower than 7. using 0 turns off the tracing and debug π
want maximum SCSI subsystem logging? here it is:
scsi_logging_level -s -a 7
β οΈ bestie, that's probably best done on a system that does NOT use a SCSI command device to hold the root file system, or the file system that holds the system log. also, SATA disks and USB attached storage nearly always use the SCSI subsystem, so keep that in mind π
π¦ AUTHORS π¦
written by IBM, with small alterations by Douglas Gilbert π§
πΈ REPORTING BUGS πΈ
report bugs to <dgilbert at interlog dot com> π
π COPYRIGHT π
Copyright Β© IBM Corp. 2006 this software is distributed under the GPL version 2. there is NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE π«Ά
the software was obtained from an IBM package called s390-tools-1.6.2, found on that company's "developerworks" site. the most recent version of that package at this time is 1.8.3 β¨
okay that's the tea, bestie π«Ά sg3_utils-1.48 from December 2022, and you're literally the main character now ππ
π¦ where this page comes from
- alpine 3.24: sg3_utils-doc 1.48-r0 Β· BSD-2-Clause AND GPL-2.0-or-later
- arch rolling: sg3_utils 1.49-1 Β· GPL-2.0-or-later AND BSD-2-Clause
- centos-stream 10: sg3_utils 1.48-11.el10 Β· GPL-2.0-or-later AND BSD-2-Clause
- debian trixie: sg3-utils 1.48-3~deb13u1
- fedora 43: sg3_utils 1.48-10.fc43 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 43: sg3_utils 1.48-6.fc43 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 44: sg3_utils 1.48-10.fc44 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 44: sg3_utils 1.48-8.fc44 Β· GPL-2.0-or-later AND BSD-2-Clause
- nixos 26.05: sg3_utils 1.48
- nixpkgs unstable: sg3_utils 1.49
- ubuntu questing: sg3-utils 1.48-2ubuntu1
- ubuntu resolute: sg3-utils 1.48-3ubuntu3
- ubuntu resolute: sg3-utils 1.48-3ubuntu3.2
- ubuntu stonking: sg3-utils 1.48-3ubuntu5
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms