Increase logging level for storage
search cancel

Increase logging level for storage

book

Article ID: 307885

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to increase logging for storage level components of an ESX host.

Symptoms:
By default you may not get SCSI sense codes and similar information in the log files.


Environment

VMware ESXi 3.5.x Embedded
VMware ESX 4.0.x
VMware vSphere ESXi 6.0
VMware ESXi 4.0.x Installable
VMware vSphere ESXi 5.0
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.5
VMware ESXi 4.1.x Installable
VMware ESX Server 3.5.x
VMware ESXi 4.0.x Embedded
VMware ESXi 4.1.x Embedded
VMware ESX 4.1.x

Resolution

When trying to troubleshoot storage issues like, SAN, iSCSI, etc. it may be necessary to increase the logging levels for these components on the ESX host. An increase to logging causes the system to write more detailed information in the logs which may be helpful in diagnosing or troubleshooting.
Warning: When increasing logging, the log file sizes increase at a more rapid rate. Ensure that you have adequate disk space to accommodate the extra messages that are logged.

ESX 3.5

To enable the logging of SCSI command errors, aborts, and multi-pathing (at the VMkernel level):
  1. Connect to the ESX host with the VMware Infrastructure Client or VirtualCenter.
  2. Click the ESX host.
  3. Click the Configuration tab.
  4. Click Advanced. This creates a new window.
  5. Click SCSI to expand the SCSI options tree.
  6. Change scsi.PrintCmdErrors to 1 .
  7. Change scsi.LogAborts to 1.
  8. Change scsi.LogMultiPath to 1.

    This procedure does not require a reboot.
To increase Service Console SCSI logging levels, a dd a boot parameter to COS. In /boot/grub/grub.conf, add scsi_logging_level=6 to the kernel line either immediately before or after the root= entry.
For example:

title VMware ESX Server
#vmware:autogenerated esx
root (hd0,0)
uppermem 277504
kernel --no-mem-option /vmlinuz-2.4.21-47.0.1.ELvmnix ro root=UUID=51beafbf-b273-4195-9a2c-04dd3b7d7786 scsi_logging_level=6 mem=272M
initrd /initrd-2.4.21-47.0.1.ELvmnix.i
Modifying grub.conf requires a reboot to take affect.

ESX/ESXi 4.x

In ESX/ESXi 4.x there are 4 logging settings:
Setting Default value (1=enabled) Description
Scsi.LogCmdErrors1 Log SCSI Device command errors
Scsi.LogMPCmdErrors1 Log SCSI Multi-path plugin command errors
Scsi.MaxReserveBacktrace0 Log a backtrace if caller exceeds SCSI_MAX_RESERVE_TIME or SCSI_MAX_RESERVE_TOTALTIME (debug only)
Scsi.ReserveBacktrace 0 Log a backtrace for all Reserve/Release pairs (debug only)
Scsi.LogCmdErrors and Scsi.LogMPCmdErrors are enabled by default. Scsi.MaxReserveBacktrace and Scsi.ReserveBacktrace are for debug purposes only. Unlike in ESX 3.x, you do not need to modify these settings to increase storage logging.
To view the settings:
  1. Connect to the ESX host with the vSphere Client or vCenter Server.
  2. Click the ESX host.
  3. Click the Configuration tab.
  4. Click Advanced. This creates a new window.
  5. Click SCSI to expand the SCSI options tree.


Additional Information