Skip to content

Enabling verbose logging on QLogic and Emulex HBAs in ESXi 5.5

KB1005576 explains how to enable or disable verbose logging on QLogic and Emulex Host Bus Adapters. With ESXi 5.5 and its Native Device Driver Architecture the option has been slightly changed, but is still available. This post explains how to enable verbose logging on QLogic and Emulex HBAs in ESXi 5.5.

The new native drivers and their predecessor are:

Emulex FC: lpfc (replaces lpfc820)
QLogic FC: qlnativefc (replaces qla2xxx)

ESXi will always load the native driver, except it is explicitly disabled. To determine which driver is actually loaded, use the esxcli storage core adapter list command:

Emulex FC HBA with Native Driver

~ # esxcli storage core adapter list
HBA Name  Driver       Link State
--------  -----------  ---------- 
vmhba1    lpfc         link-up
vmhba2    lpfc         link-up

Emulex FC HBA with Legacy Driver

~ # esxcli storage core adapter list
HBA Name  Driver       Link State
--------  -----------  ---------- 
vmhba1    lpfc820      link-up
vmhba2    lpfc820      link-up

QLogic FC HBA with Native Driver

~ # esxcli storage core adapter list
HBA Name  Driver       Link State
--------  -----------  ----------
vmhba1    qlnativefc   link-up   
vmhba2    qlnativefc   link-up

QLogic FC HBA with Legacy Driver

~ # esxcli storage core adapter list
HBA Name  Driver       Link State
--------  -----------  ----------
vmhba1    qla2xxx      link-up   
vmhba2    qla2xxx      link-up

You can alternatively verify which driver is loaded with esxcfg-module:

~ # esxcfg-module --list |grep ql
qlnativefc               2    1500

~ # esxcfg-module --list |grep ql
qla2xxx                  2    1324

~ # esxcfg-module --list |grep lpfc
lpfc                     2    1500

~ # esxcfg-module --list |grep lpfc
lpfc820                  2    820

It may be possible that driver options are not at their default value. We should check this prior to change anything. Determine the options that have been manually changed:

In this example, error logging is already enabled:

~ # esxcfg-module -q | grep -E "^ql|^lpfc"
 ql2xxx ql2xextended_error_logging=1

If there is no output except the driver itself, no options are enabled:

~ # esxcfg-module -q | grep -E "^ql|^lpfc"
lpfc820

You can also list all options and their value with esxcli system module parameters list -m <driver>, but this will produce much more output than the esxcfg-module command:

~ # esxcli system module parameters list -m lpfc
Name                         Type  Value  Description
---------------------------  ----  -----  -------------------------------------------------------------------------------
lpfc0_ack0                   int          Enable ACK0 support
lpfc0_compression_log        int          Frequency compression logs are written (seconds)
lpfc0_cr_count               int          A count of I/O completions after which an interrupt response is generated
lpfc0_cr_delay               int          A count of milliseconds after which an interrupt response is generated
lpfc0_devloss_tmo            int          Seconds driver hold I/O waiting for a loss device to return
lpfc0_disable_mq             int          Disable MQ functionality.
[...]

Activate extended QLogic HBA logging with the native driver

~ # esxcfg-module -s ql2xextended_error_logging=1 qlnativefc

Or

~ # esxcli system module parameters set -p ql2xextended_error_logging=1 -m qlnativefc

Reboot the ESXi host to make the change active. Any extended log messages will be written to /var/log/vmkernel.log

Activate extended Emulex HBA logging with the native driver
Emulex driver logging is slightly more complicated, as you can enable different event types separately. The most commonly log levels are:

Limited verbose logging:

~ # esxcli system module parameters set -p "lpfc_log_verbose=0x10c3" -m lpfc

Full verbose logging (Be careful with this, as it will produce a lot of messages):

~ # esxcli system module parameters set -p "lpfc_log_verbose=0x7ffff " -m lpfc

If you want a more granular configuration, use this table to build your own log level:

Log MessageBit MaskDescription
LOG_ELS0x1ELS events
LOG_DISCOVERY0x2Link discovery events
LOG_MBOX0x4Mailbox events
LOG_INIT0x8Initialization events
LOG_LINK_EVENT0x10Link events
LOG_FCP0x40FCP traffic history
LOG_NODE0x80Node table events
LOG_TEMP0x100Temperature sensor events
LOG_MISC0x400Miscellaneous and FCoE events
LOG_SLI0x800SLI events
LOG_FCP_ERROR0x1000Selective FCP events
LOG_LIBDFC0x2000IOCTL events
LOG_VPORT0x4000NPIV events
LOG_EVENT0x10000IOCTL event
LOG_DAEMON0x20000IOCTL Daemon events
LOG_FIP0x40000FIP event
LOG_PROC0x80000Procfs events
LOG_FCP_UNDERRUN0x100000FCP underruns
LOG_ALL_MSG0x7fffffffLog all messages

 

Leave a Reply

Your email address will not be published. Required fields are marked *