Linux Log All SCSI Events To Syslog

‮l.www‬autturi.com
Linux Log All SCSI Events To Syslog

To log all SCSI events to syslog in Linux, you can use the sd_mod kernel module. This module allows you to log all SCSI events to syslog, including device attachment, detachment, and other events.

To enable logging of SCSI events to syslog, you will need to load the sd_mod kernel module and enable the sd_log_notify option.

To load the sd_mod kernel module, you can use the modprobe command:

$ modprobe sd_mod

To enable the sd_log_notify option, you can use the modprobe command with the sd_log_notify option:

$ modprobe sd_mod sd_log_notify=1

This will enable logging of SCSI events to syslog for all devices.

You can also add the sd_mod kernel module and the sd_log_notify option to the /etc/modprobe.d/sd_mod.conf file, so that they are automatically loaded at boot time.

For example, to add the sd_mod kernel module and the sd_log_notify option to the /etc/modprobe.d/sd_mod.conf file, you can use the following command:

$ echo "options sd_mod sd_log_notify=1" | sudo tee -a /etc/modprobe.d/sd_mod.conf

This will add the sd_mod kernel module and the sd_log_notify option to the /etc/modprobe.d/sd_mod.conf file, so that they are automatically loaded at boot time.

Note that the sd_mod kernel module and the sd_log_notify option are not available on all Linux distributions. Check the documentation for your specific distribution to determine whether these options are available and how to use them.

Created Time:2017-10-30 10:17:35  Author:lautturi