scsi_logging_level - Set and get the SCSI logging level
Use the scsi_logging_level command to create, set, or get the SCSI logging level.
The SCSI logging feature is controlled by a 32-bit value – the SCSI logging level. This value is divided into 3-bit fields that describe the log level of a specific log area. Due to the 3-bit subdivision, setting levels or interpreting the meaning of current levels of the SCSI logging feature is not trivial. The scsi_logging_level script helps with both tasks.
scsi_logging_level syntax
Where:
- -a or --all <level>
- specifies value for all SCSI_LOG fields.
- -E or --error <level>
- specifies SCSI_LOG_ERROR.
- -T or --timeout <level>
- specifies SCSI_LOG_TIMEOUT.
- -S or --scan <level>
- specifies SCSI_LOG_SCAN.
- -M or --midlevel <level>
- specifies SCSI_LOG_MLQUEUE and SCSI_LOG_MLCOMPLETE.
- --mlqueue <level>
- specifies SCSI_LOG_MLQUEUE.
- --mlcomplete <level>
- specifies SCSI_LOG_MLCOMPLETE.
- -L or --lowlevel <level>
- specifies SCSI_LOG_LLQUEUE and SCSI_LOG_LLCOMPLETE.
- --llqueue <level>
- specifies SCSI_LOG_LLQUEUE.
- --llcomplete <level>
- specifies SCSI_LOG_LLCOMPLETE.
- -H or --highlevel <level>
- specifies SCSI_LOG_HLQUEUE and SCSI_LOG_HLCOMPLETE.
- --hlqueue <level>
- specifies SCSI_LOG_HLQUEUE.
- --hlcomplete <level>
- specifies SCSI_LOG_HLCOMPLETE.
- -I or --ioctl <level>
- specifies SCSI_LOG_IOCTL.
- -s or --set
- creates and sets the logging level as specified on the command line.
- -g or --get
- gets the current logging level.
- -c or --create
- creates the logging level as specified on the command line.
- -v or --version
- displays version information.
- -h or --help
- displays help text.
You can specify several SCSI_LOG fields by using several options. When multiple options specify the same SCSI_LOG field, the most specific option has precedence.
Examples
- This command displays the logging word of the SCSI logging feature and each logging level.
# scsi_logging_level -g Current scsi logging level: dev.scsi.logging_level = 0 SCSI_LOG_ERROR=0 SCSI_LOG_TIMEOUT=0 SCSI_LOG_SCAN=0 SCSI_LOG_MLQUEUE=0 SCSI_LOG_MLCOMPLETE=0 SCSI_LOG_LLQUEUE=0 SCSI_LOG_LLCOMPLETE=0 SCSI_LOG_HLQUEUE=0 SCSI_LOG_HLCOMPLETE=0 SCSI_LOG_IOCTL=0
- This command sets all logging levels to 3:
# scsi_logging_level -s -a 3 New scsi logging level: dev.scsi.logging_level = 460175067 SCSI_LOG_ERROR=3 SCSI_LOG_TIMEOUT=3 SCSI_LOG_SCAN=3 SCSI_LOG_MLQUEUE=3 SCSI_LOG_MLCOMPLETE=3 SCSI_LOG_LLQUEUE=3 SCSI_LOG_LLCOMPLETE=3 SCSI_LOG_HLQUEUE=3 SCSI_LOG_HLCOMPLETE=3 SCSI_LOG_IOCTL=3
- This command sets SCSI_LOG_HLQUEUE=3, SCSI_LOG_HLCOMPLETE=2 and
assigns all other SCSI_LOG fields the value 1.
# scsi_logging_level --hlqueue 3 --highlevel 2 --all 1 -s New scsi logging level: dev.scsi.logging_level = 174363209 SCSI_LOG_ERROR=1 SCSI_LOG_TIMEOUT=1 SCSI_LOG_SCAN=1 SCSI_LOG_MLQUEUE=1 SCSI_LOG_MLCOMPLETE=1 SCSI_LOG_LLQUEUE=1 SCSI_LOG_LLCOMPLETE=1 SCSI_LOG_HLQUEUE=3 SCSI_LOG_HLCOMPLETE=2 SCSI_LOG_IOCTL=1