scsi_logging_level - Use the SCSI logging feature

Use the scsi_logging_level command to create, set, or get the SCSI logging level.

The SCSI logging feature prints SCSI messages of the various log areas to the kernel message log file /var/log/messages. This feature is used to get information about:
  • Issues with the LUN discovery.
  • Issues with SCSI error handling and recovery, for example, problems with dirty fibers.

scsi_logging_level syntax

See the scsi_logging_level man page for the complete syntax and all options.

1  scsi_logging_level
2.1+  
2.1   -a  <level>
2.1   -E  <level>
2.1   -T  <level>
2.1   -S  <level>
2.1   -M  <level>
2.1   --mlqueue  <level>
2.1   --mlcomplete  <level>
2.1   -L  <level>
2.1   --llqueue  <level>
2.1   --llcomplete  <level>
2.1   -H  <level>
2.1   --hlqueue  <level>
2.1   --hlcomplete  <level>
2.1   -I  <level>
2.1  -s 
2.1  -g 
2.1  -c 

Parameters:

-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

  • To display the logging word of the SCSI logging feature and each logging level, use the following command:
    # scsi_logging_level -g
    
  • To set an appropriate log level for the most important log areas with only negligible impact on the performance, use the following command:
    # scsi_logging_level --mlcomplete 1 -T 7 -E 5 -S 7 -I 0 -a 0 -s
    
  • You can add the SCSI logging level to the kernel boot parameters. To add it, specify for example:
    "scsi_mod.scsi_logging_level=4605" 
  • To switch off the logging feature, use the following command:
    # scsi_logging_level -s -a 0