11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Trace is a valuable tool for observing system and application execution. Where other tools<br />

provide high level statistics such as CPU utilization or I/O wait time, the trace facility is useful<br />

in expanding the information to understand the who, when, how, and why of an event.<br />

Single thread trace<br />

In prior versions of <strong>AIX</strong>, system trace would trace the entire system. In <strong>AIX</strong> V5.3, the system<br />

trace facility has been enhanced by new flags. This enables the trace to run only for specified<br />

processes, threads, or programs. The system trace can be used to trace the processor<br />

utilization register (PURR) to provide more accurate event timings in a shared processor<br />

partition environment.<br />

Administrative control of the user trace buffers<br />

Also, in previous versions of <strong>AIX</strong>, the trace buffer size for a regular user is restricted to a<br />

maximum of 1 MB. Version 5.3 allows the system group users to set the trace buffer size<br />

either through a new command, trcctl, or using a new SMIT menu called Manage Trace:<br />

smitty trace → Manage Trace<br />

To check the actual trace subsystem properties, use the trcctl command, as shown in<br />

Example 2-2.<br />

Example 2-2 Trace characteristics<br />

lpar15root:/root#trcctl<br />

Default Buffer Size: 262144<br />

Default Log File Size: 2621440<br />

Default Log File: /var/adm/ras/trcfile<br />

Non-Root User Buffer Size Maximum: 1048576<br />

Default Components Directory: /var/adm/ras/trc_ct<br />

Default LMT Log Dir: /var/adm/ras/mtrcdir<br />

To list all trace event groups, you can use the following command:<br />

trcevgrp -l<br />

There are several trace-related tools which are used for various operating system<br />

components:<br />

► CPU monitoring tprof, curt, splat, trace, trcrpt<br />

► Memory monitoring trace, trcrpt<br />

► I/O subsystem trace, trcrpt<br />

► Network iptrace, ipreport, trace, trcrpt<br />

► Processes and threads tprof, pprof, trace, trcrpt<br />

Trace can be used in two ways: interactively, or asynchronously, as explained here:<br />

► Interactively<br />

The following sequence of commands runs an interactive trace on the program myprog<br />

and ends the trace:<br />

trace -j30D,30E -o trace.file<br />

->!myprog<br />

->q<br />

28 <strong>IBM</strong> <strong>AIX</strong> <strong>Continuous</strong> <strong>Availability</strong> <strong>Features</strong>

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

Saved successfully!

Ooh no, something went wrong!