Linux Log All SCSI Events To Syslog

Posted on in Categories , last updated July 4, 2011

How can I log all SCSI events to syslog system under CentOS or Fedora or RHEL or Red hat Linux operating systems?

If you need scsi logging, use /proc/sys/dev/scsi/logging_level kernel variable. Set it as follows:

  • -1 – Enable scsi events to syslog.
  • 0 – Disable scsi events to syslog.

Turn it on, enter:

 /proc/sys/dev/scsi/logging_lev

Please note this will result into large amount of entries in syslog per second. To turn it off, enter:

 /proc/sys/dev/scsi/logging_lev

I strongly suggest that you setup syslog to log to an external syslog server on your LAN for performance reasons.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment