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 Message | Bit Mask | Description |
LOG_ELS | 0x1 | ELS events |
LOG_DISCOVERY | 0x2 | Link discovery events |
LOG_MBOX | 0x4 | Mailbox events |
LOG_INIT | 0x8 | Initialization events |
LOG_LINK_EVENT | 0x10 | Link events |
LOG_FCP | 0x40 | FCP traffic history |
LOG_NODE | 0x80 | Node table events |
LOG_TEMP | 0x100 | Temperature sensor events |
LOG_MISC | 0x400 | Miscellaneous and FCoE events |
LOG_SLI | 0x800 | SLI events |
LOG_FCP_ERROR | 0x1000 | Selective FCP events |
LOG_LIBDFC | 0x2000 | IOCTL events |
LOG_VPORT | 0x4000 | NPIV events |
LOG_EVENT | 0x10000 | IOCTL event |
LOG_DAEMON | 0x20000 | IOCTL Daemon events |
LOG_FIP | 0x40000 | FIP event |
LOG_PROC | 0x80000 | Procfs events |
LOG_FCP_UNDERRUN | 0x100000 | FCP underruns |
LOG_ALL_MSG | 0x7fffffff | Log all messages |