Search the VMware Knowledge Base (KB)
View by Article ID

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

  • 13 Ratings

Purpose

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).

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_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_MISC 0x400 Miscellaneous events
LOG_SLI 0x800 SLI events
LOG_CHK_COND 0x1000 FCP Check condition flag
LOG_LIBDFC 0x2000 IOCTL events
LOG_ALL_MSG 0x7ffff LOG 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.

See Also

Update History

09/07/2010 - Separated the commands for ESX 3.5 and 4.x 01/09/2012 - Added information that system logs show additional logging and added ESX 5.x to Products 01/23/2012 - Added note that you will need to reboot the host after enabling verbose logging 03/05/2012 - Added commands to enable/disable logging on the Emulex driver 07/24/2012 - Added link to Emulex driver manual

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 13 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 13 Ratings
Actions
KB: