Enabling or disabling verbose logging on QLogic and Emulex Host Bus Adapters
search cancel

Enabling or disabling verbose logging on QLogic and Emulex Host Bus Adapters

book

Article ID: 343530

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides the commands to enable, disable, or decrease verbose or extended logging on the driver used to communicate with a QLogic or Emulex Host Bus Adapter (HBA).

Environment

VMware ESX Server 3.0.x
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Embedded
VMware ESX 4.0.x
VMware vSphere ESXi 6.0
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.0
VMware vSphere ESXi 6.7
VMware vSphere ESXi 6.5
VMware ESX Server 3.5.x
VMware ESXi 4.1.x Embedded
VMware ESX 4.1.x
VMware ESXi 4.0.x Embedded
VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.1

Resolution

Determining the driver that your ESX host uses

Note: All commands are available through the vSphere Command-line Interface or VMware vSphere Management Assistant Guide, or from the ESX console / ESXi Direct Console User Interface (DCUI). For details on using the DCUI, see Tech Support Mode for Emergency Support (1003677).

  • To list all modules currently loaded, run the command:

    # esxcfg-module --list

    The output appears similar to:

    Device Driver Modules
    Module Enabled Loaded
    vmklinux true true
    [...]
    vmfs2 true true
    iscsi_mod true true
    qla2300_707_vmw true false


    Note: QLogic driver names begin with ql and Emulex begins with lpfc.

  • To list all available QLogic modules, run the command:

    # ls /usr/lib/vmware/vmkmod | grep ql

  • To list all available Emulex modules, run the command:

    # ls /usr/lib/vmware/vmkmod | grep lpfc

Module names

In ESXi/ESX 3.5:
  • The QLogic modules are:

    • For FC: qla2300_707_vmw.o
    • For iSCSI: qla4010.o
    • For iSCSI: qla4022.o

  • The Emulex module is:

    • lpfc_740.o
In ESXi/ESX 4.x/5.x:
  • The QLogic modules are:

    • For FC: qla2xxx.o or qlnativefc (5.5)
    • For iSCSI: qla4xxx.o

  • The Emulex module is:

    • lpfc820.o

Determining the options and the modules in use

To determine the options and modules that are in use, run the command:

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

The output appears similar to:

lpfc820.o lpfc0_lun_queue_depth=2 lpfc1_lun_queue_depth=2
qla2xxx.o ql2xextended_error_logging=1


Enabling or disabling verbose logging


For the QLogic HBA

Note: Use the correct QLogic module name based on the result from the Determining the options and the modules in use section.
  • qlge

    To enable verbose logging:

    esxcfg-module -s debug=Debug_Level driver

    Note: Debug level values can range from 0 (none) to 16 (all).

  • qla2xxx or qla2300_707_vmw

    To enable verbose logging:

    esxcfg-module -s ql2xextended_error_logging=1 driver

    To disable verbose logging:

    esxcfg-module -s ql2xextended_error_logging=0 driver

  • qla4xxx, qla4010, or qla4022

    To enable verbose logging:

    esxcfg-module -s extended_error_logging=1 driver

    To disable verbose logging:

    esxcfg-module -s extended_error_logging=0 driver

    Note: Forqla4xxx, the ql4xextended_error_logging parameter may be used instead ofextended_error_logging.

    To check which parameter should be used, run this command:

    vmkload_mod -s qla4xxx | grep extended

    Notes:


  • qlnativefc

    To enable extended logging:

    /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -i vmhbaX/qlogic -s scsi-qlaenable-log -k ADAPTER

    To disable extended logging:

    /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -i vmhbaX/qlogic -s scsi-qladisable-log -k ADAPTER

    To enable at boot time:

    1. Run the command:

      esxcfg-module -s "ql2xextended_error_logging=1" qlnativefc

      Or

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

    2. Reboot the host.

      Extended logging is now enabled at boot, and begins immediately after boot.
  • bnx2x

    To enable verbose logging:

    esxcfg-module -s debug=Debug_Level driver

    Note: Debug level values can range from 0 (none) to 16 (all).
For Example : esxcfg-module -s debug=0xfffffff bnx2x


Storage Drivers:

  • bnx2fc (fcoe)

    To enable verbose logging:

    esxcfg-module -s debug=Debug_Level driver

    Note: Debug level values can range from 0 (none) to 16 (all).

    For example: esxcfg-module -s bnx2fc_debug_level=0xfffffff bnx2fc


  • bnx2i (iscsi)

    To enable verbose logging:

    esxcfg-module -s debug=Debug_Level driver

    Note: Debug level values can range from 0 (none) to 16 (all).

    For example: esxcfg-module -s bnx2i_debug_level=0xfffffff bnx2i

To see what parameter is needed for debug: run below command

esxcfg-module -i driver
For example: esxcfg-module -i bnx2x

To set parameter option run below command:
esxcfg-module -s

For Emulex

Emulex driver tuning is slightly more complicated as there are many different parameters that can be enabled to fine tune logging. VMware recommends that you refer to Emulex documentation for more information on these parameters.

This table contains a partial list of events which can be enabled for logging:

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_MISC0x400Miscellaneous events
LOG_SLI0x800SLI events
LOG_CHK_COND0x1000FCP Check condition flag
LOG_LIBDFC0x2000IOCTL events
LOG_ALL_MSG0x7ffffLOG all messages


For more information on the complete list of parameters, see Emulex Drivers for VMware ESX/ESXi User Manual.

Note: The preceding link was correct as of October 24, 2014. If you find the link is broken, provide feedback and a VMware employee will update the link.

  • To enable all logging, run the command:

    esxcfg-module -s lpfc_log_verbose=0x7ffff driver_name

    Caution: Setting the maximum verbosity level above generates significant logging output.

  • To enable a slightly limited verbose logging level, run the command:

    esxcfg-module -s lpfc_log_verbose=0xc3 driver_name

  • To disable verbose logging, run the command:

    esxcfg-module -s lpfc_log_verbose=0 driver_name

  • To enable logging in ESXi 5.x, run the esxcli system module parameters set command. For example, for the Emulex light pulse fibre channel card, run the command:

    esxcli system module parameters set -p lpfc0_log_verbose=1 -m driver name

Notes:


Additional Information

Notes:
  • These changes take effect after rebooting the server. Evacuate the server of virtual machines using vMotion (or power them down), or select the VMware ESX host in your VMware vSphere or VMware Infrastructure Client inventory and reboot it. Alternatively, reboot it through the terminal by running the reboot command.
  • The system logs show the additional logging after the server is rebooted.
Warning: VMware recommends that you reverse the configuration changes (to debug level 0) when troubleshooting has been completed. Verbose logging consumes logging partition space at an accelerated rate and may exhaust the partition of its free space. This prevents further logging for root-cause analysis of other issues, and may induce other ESX host operating system management problems.
QLotic および Emulex ホスト バス アダプタでの詳細なログを有効化または無効化する
在 QLogic 和 Emulex 主机总线适配器上启用或禁用详细日志记录