SCSI_LOGGING_LEVEL(8)

πŸ“¦
version 1.49 Β· 3 versions
, in alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ 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 β€” slap LEV onto 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 β€” drops LEV into 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 β€” puts LEV into both the SCSI_LOG_HLQUEUE and SCSI_LOG_HLCOMPLETE fields πŸ’œ
  • --hlcomplete=LEV β€” puts LEV into the SCSI_LOG_HLCOMPLETE field, just that one πŸŽ€
  • --hlqueue=LEV β€” puts LEV into the SCSI_LOG_HLQUEUE field πŸ“
  • -I, --ioctl=LEV β€” puts LEV into the SCSI_LOG_IOCTL field 🌈
  • --llcomplete=LEV β€” puts LEV into the SCSI_LOG_LLCOMPLETE field πŸ¦‹
  • --llqueue=LEV β€” puts LEV into the SCSI_LOG_LLQUEUE field 🧚
  • -L, --lowlevel=LEV β€” puts LEV into both the SCSI_LOG_LLQUEUE and SCSI_LOG_LLCOMPLETE fields πŸ’…
  • -M, --midlevel=LEV β€” puts LEV into both the SCSI_LOG_MLQUEUE and SCSI_LOG_MLCOMPLETE fields 🫢
  • --mlcomplete=LEV β€” puts LEV into the SCSI_LOG_MLCOMPLETE field 🌸
  • --mlqueue=LEV β€” puts LEV into the SCSI_LOG_MLQUEUE field ⭐
  • -S, --scan=LEV β€” puts LEV into 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 β€” puts LEV into 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 © 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