User Tools

Site Tools


aix:aix_debug

This is an old revision of the document!


Howto debug AIX commands

Debug a process

Use the trace command

Give an output very low level, hard to interpret. To debug into a WPAR, you have to start the trace from Global, with option -@:

# trace -a -o /tmp/my_trace_log -@wpar1 ; clogin wpar1 enable PRINT1  ; trcstop
# trcrpt /tmp/my_trace_log > /tmp/my_trace_log.txt

Use the truss command

More friendly: truss <options> <command to trace>

# truss -f -t !close -o /tmp/truss.out /usr/sbin/sshd -p 4444 -d 
  • -t !close : suppress all close system call (many unsusable line into the log file).
  • -f : trace also children processes from main process.
  • -o /tmp/truss.out :output file, directly readable.

Basically trace a process ID:

# truss -p 348468

Debug LPAR startup

First connect to the HMC in SSH using putty, and enable the –> session –> logging

Then open a console on the LPAR that doesn't boot (mkvterm, or vtmenu), and start the LPAR from web interface in advanced mode

Back in the SSH console session window, wait for the Open Firmware prompt "0>"
At the 0> prompt, enter "boot -s verbose"
For cdrom boot debug enter:
  0> boot cdrom:\ppc\chrp\bootfile.exe -s verbose

At this point, the LPAR will continue to boot and debug information will be sent to the console. While the LPAR is booted in this debug state, all commands that are run will output debug information, such as exec() system calls.

aix/aix_debug.1609532520.txt.gz · Last modified: 2021/01/01 21:22 by 127.0.0.1