Capturing a hardware trace

6.10 LPAR mode z/VM guest

Hardware traces are intended for use by the IBM® Support organization. Hardware tracing is turned off by default. Turn on the hardware-tracing feature only when instructed to do so by IBM Support.

Before you begin

  • The OSA-Express adapter must support the hardware-tracing feature.
  • The qeth device must be online to return valid values of the hw_trap attribute.

About this task

When errors occur on an OSA-Express adapter, both software and hardware traces must be collected. Instructions for software traces depend on a case-by-case basis and are communicated as part of the service process. The hardware-tracing feature requests a hardware trace if an error is detected. This feature makes it possible to correlate the hardware trace with the device driver trace. If the hardware-tracing feature is activated, traces are captured automatically, but you can also start the capturing yourself.

Procedure

To activate or deactivate the hardware-tracing feature, issue a command of the form:
# echo <value> > /sys/devices/qeth/<device_bus_id>/hw_trap
Where <value> can be:
arm
If the hardware-tracing feature is supported, write arm to the hw_trap sysfs attribute to activate it. If the hardware-tracing feature is present and activated, the hw_trap sysfs attribute has the value arm.
disarm
Write disarm to the hw_trap sysfs attribute to turn off the hardware-tracing feature. If the hardware-tracing feature is not present or is turned off, the hw_trap sysfs attribute has the value disarm. This setting is the default.
trap
(Write only) Capture a hardware trace. Hardware traces are captured automatically, but if asked to do so by IBM Support, you can start the capturing yourself by writing trap to the hw_trap sysfs attribute. The hardware trap function must be set to arm.

Examples

In this example the hardware-tracing feature is activated for qeth device 0.0.a000:

# echo arm > /sys/devices/qeth/0.0.a000/hw_trap

In this example a trace capture is started on qeth device 0.0.a000:

  1. Check that the hw_trap sysfs attribute is set to arm:
    # cat /sys/devices/qeth/0.0.a000/hw_trap
    arm
  2. Start the capture:
    # echo trap > /sys/devices/qeth/0.0.a000/hw_trap