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.

kernel routine records the process ID and the address of the instruction<br />

executing when the interrupt occurred and this information is used by the tprof<br />

command. The tprof command also records whether the process counter is in<br />

the kernel address space, the user address space, or the shared library address<br />

space.<br />

In <strong>AIX</strong> <strong>5L</strong> Version 5.1, the tprof command has been enhanced to do subroutine<br />

or method level profiling for Java applications. The Java Virtual Machine Profiling<br />

Interface (JVMPI), a new feature supported by Java 1.2 or later, has been<br />

enhanced to do class and method level profiling for Java applications. The -j flag<br />

was added to tprof to enable profiling for Java applications.<br />

The tprof summary CPU utilization report<br />

A summary ASCII report with the suffix .all is always produced. If no program is<br />

specified, the report is named __prof.all. If a program is specified, the report is<br />

named __program.all. This report contains an estimate of the amount of CPU<br />

time spent in each process that was executing while the tprof command was<br />

monitoring the system. This report also contains an estimate of the amount of<br />

CPU time spent in each of the three address spaces.<br />

The files containing the reports are left in the working directory. All files created<br />

by the tprof command are prefixed by two underscores (___).<br />

In the following example, a generic report generated an output of:<br />

# tprof -x sleep 30<br />

Starting Trace now<br />

Starting sleep 30<br />

Wed Jun 28 14:58:58 2000<br />

System: <strong>AIX</strong> server3 Node: 4 Machine: 000BC6DD4C00<br />

Trace is done now<br />

30.907 secs in measured interval<br />

* Samples from __trc_rpt2<br />

* Reached second section of __trc_rpt2<br />

In this case, sleep 30 points out to the tprof command to run for 30 seconds.<br />

The total column<br />

The total column in __prof.all is of interest. The first section indicates the use of<br />

ticks on a per-process basis.<br />

Process PID TID Total Kernel User Shared Other<br />

======= === === ===== ====== ==== ====== =====<br />

wait 516 517 3237 3237 0 0 0<br />

tctestprg 14746 13783 3207 1 3206 0 0<br />

tctestprg 13730 17293 3195 0 3195 0 0<br />

244 <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!