How to generate application core dumps on AIX

book

Article ID: 100001464

calendar_today

Updated On:

Resolution

The steps below can be used to collect an application coredump on AIX. This is to be used in situations where process hangs need to be diagnosed, such as when vxconfigd is hanging, or the VCS had process is hanging.
 
1. Check if the "fullcore" flag is on:
 
# lsattr -E -lsys0 -a fullcore
fullcore false Enable full CORE dump True
 
If not, set it to "true":
 
# chdev -l sys0-a fullcore=true
sys0 changed
 
 
2. Generate a coredump of the hung process:
 
# gencore
 
E.g. core-dumping the vxconfigd process:
 
# ps -aef |grep -i vxconfigd
root 188538 1 0Feb 21 - 0:19 vxconfigd -x syslog -m boot
 
# gencore 188538 /tmp/core
 
# ls -l
total 23800
-rw-rw-rw- 1root system 12183573 Mar 22 08:50 core
 
# file core
core: AIX corefile fulldump 32-bit, vxconfigd.5.3
 
 
3. Collect the core, associated binary and relevant libraries to help debug the core. In the example below, the core file location and associated binary are used as arguments:
 
# snapcore /tmp/core /sbin/vxconfigd.5.3
 
Core file "core" created by "vxconfigd.5.3"
pass1() in progress ....
Calculating space required .
Total space required is 38600 kbytes ..
Checking for available space ...
Available space is 1676064 kbytes
pass1 complete.
pass2() in progress ....
Collecting fileset information .
Collecting error report of CORE_DUMP errors ..
Creating readme file ..
Creating archive file ...
Compressing archive file ....
pass2completed.
 
Snapcore completed successfully. Archive created in /tmp/snapcore.
 
# ls -l
total 48400
-rw-rw-rw- 1root system 12183573 Mar 22 08:50 core
-rw-r--r-- 1root system 12594032 Mar 22 08:50 snapcore_663646.pax.Z
 
# filesnapcore_663646.pax.Z
snapcore_663646.pax.Z:compressed data block compressed 16 bit
 
The resulting snapcore file can then be sent to Technical Support. It can then be uncompressed and untarred (tar can work on pax images).

Issue/Introduction

How to generate application core dumps on AIX