21.02.2013 Views

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.5.1 Trace hook IDs<br />

The events traced are referenced by hook identifiers. Each hook ID uniquely<br />

refers to a particular activity that can be traced.<br />

Hook IDs are defined in the /usr/include/sys/trchkid.h file. When tracing, you can<br />

select the hook IDs of interest by using the trace -j command, and exclude<br />

others that are not relevant to your problem by using the trace -k command.<br />

The following example is extracted from the trchkid.h file:<br />

...<br />

#define HKWD_SYSC_MKDIR 0x15600000<br />

#define HKWD_SYSC_MKNOD 0x15700000<br />

#define HKWD_SYSC_MNTCTL 0x15800000<br />

#define HKWD_SYSC_MOUNT 0x15900000<br />

#define HKWD_SYSC_NICE 0x15a00000<br />

#define HKWD_SYSC_OPEN 0x15b00000<br />

#define HKWD_SYSC_OPENX 0x15c00000<br />

#define HKWD_SYSC_OUNAME 0x15d00000<br />

#define HKWD_SYSC_PAUSE 0x15e00000<br />

#define HKWD_SYSC_PIPE 0x15f00000<br />

#define HKWD_SYSC_PLOCK 0x16000000<br />

#define HKWD_SYSC_PROFIL 0x16100000<br />

#define HKWD_SYSC_PTRACE 0x16200000<br />

#define HKWD_SYSC_READ 0x16300000<br />

#define HKWD_SYSC_READLINK 0x16400000<br />

#define HKWD_SYSC_READX 0x16500000<br />

#define HKWD_SYSC_REBOOT 0x16600000<br />

#define HKWD_SYSC_RENAME 0x16700000<br />

#define HKWD_SYSC_RMDIR 0x16800000<br />

...<br />

When specifying the hook ID to the trace command, only the three left-most<br />

digits should be specified. From the preceding example, when the open system<br />

call is traced, the ID 15b must be specified.<br />

Specifying relevant (or irrelevant) hook IDs can be difficult at this time since you<br />

do not know the actual cause of the problem. If source code access to the<br />

application is available or the developer is known, then this can be helpful for<br />

specifying useful hook IDs.<br />

Note: Specifying useful hook IDs can reduce the mount of data significantly<br />

and make the analysis part of the problem easier.<br />

212 <strong>IBM</strong> ^ Certification Study Guide - <strong>AIX</strong> <strong>5L</strong> <strong>Problem</strong> <strong>Determination</strong> Tools and Techniques

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!