IBM Support

How to start kernel trace during boot?

Question & Answer


Question

How to start kernel trace during boot?

Answer

How to start kernel trace during boot?
Jump to section: (Intro) (Step 1) (Step 2) (Step 3) (Step 4) (Step 5) (Step 6) (Example1) (Example2)
Overview
Step-by-Step Instructions


Intro

Following steps describe how to start kernel trace at boot time.

Note: These steps need to be used only when asked by AIX support team. The AIX Support will provide component name and hooks depending upon the component being debugged.

Step 1:

(1) Run ctctrl command to set trace level of appropriate component to systracemax (i.e. 9). The component name will be provided by the AIX support team.


Step 2:

(2)

(a) Create a special directory to save the trace files. e.g. /tmp/ibm
Note: Make sure that /tmp/ibm has plenty of free space.

(b) Add "trace" command as shown below red in the /sbin/rc.boot immediately before the line
"cfgmgr -p2 -v 2>&1 | alog -t boot # key is in normal position".
Note: The hooks will be provided by the AIX support team.

=== start of /sbin/rc.boot ===
...
...
trace -C all -a -l n -j
(add trace hooks provided by the AIX support team here) -L 40000000 -T 20000000 -o /tmp/ibm/trc.bin

cfgmgr -p2 -v 2>&1 | alog -t boot # key is in normal position
...
...

=== end of /sbin/rc.boot ===

Step 3:

(3) Add "trcstop" command at the very bottom of /etc/rc.tcpip file.

Step 4:

(4) Reboot the system.

Step 5:

(5) Multiple files will be created in /tmp/ibm directory. Send all files in /tmp/ibm directory to AIX Support along with full snap for analysis.

Step 6:

(6) Once debugging is done, set component trace level to normal.

Example 1:

Example 1:

Configuration:
- AIX system has 10 Gb ethernet adapter configured as ent0.
- ent0 PCIe2 4-Port Adapter (10GbE SFP+) (e4148a1614109304)
- Feature Code/Marketing ID: EN0S
- trace hooks: 105d,105e,105f,1061

This 10 Gb adapter uses driver "shientdd" and there is a need to trace events of this driver at boot time.

Steps:
(1) set component trace for shientdd to 9.
ctctrl systracemax -c shientdd -r

(2) Add "trace" command as shown below in red in the /sbin/rc.boot.

(a) mkdir /tmp/ibm
Note: Make sure that /tmp has plenty of free space

(b) trace -C all -a -l -n -j 105d,105e,105f,1061 -L 40000000 -T 20000000 -o /tmp/ibm/trace.bin

(3) Add "trcstop" command at the very bottom of /etc/rc.tcpip file.

(4)
Reboot the system.

(5) Multiple file will be created in /tmp/ibm directory. Send all files in /tmp/ibm directory along with full snap to AIX Support for analysis.


(6) Once debugging is done, set component trace level to normal.
ctctrl systracenormal -c shientdd -r

Example 2:

Example 2:

Configuration:
- AIX system has etherchannel device configured.
- ent4 EtherChannel / IEEE 802.3ad Link Aggregation
- trace hooks: 2FA,2FB

This etherchannel device uses driver "ethchandd" and there is a need to trace events of this driver at boot time.

Steps:
(1) set component trace for etherchannel to 9.
ctctrl systracemax -c etherchannel -r

(2) Add "trace" command as shown below in red in the /sbin/rc.boot.

(a) mkdir /tmp/ibm
Note: Make sure that /tmp has plenty of free space

(b) trace -C all -a -l -n -j 2FA, 2FB -L 40000000 -T 20000000 -o /tmp/ibm/trace.bin

(3) Add "trcstop" command at the very bottom of /etc/rc.tcpip file.

(4)
Reboot the system.

(5) Multiple file will be created in /tmp/ibm directory. Send all files in /tmp/ibm directory along with full snap to AIX Support for analysis.


(6) Once debugging is done, set component trace level to normal.
ctctrl systracenormal -c etherchannel -r

Document Type: Instruction
Content Type: Howto
Hardware: all Power
Operating System: all AIX
Author(s): Darshan Patel

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Network communications","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"Standard","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1025569