Tuesday, August 21, 2012

How to print out top CPU-hogging program(s) and their associated libraries on Aix

While your application is running under load, do the following:

# tprof -x sleep 60

Sun Dec  4 15:55:01 2005
System: AIX 5.3 Node: pw101 Machine: 002FBF7D4C00
Starting Command sleep 60
stopping trace collection.
Generating sleep.prof


# more sleep.prof

Configuration information
=========================
System: AIX 5.3 Node: pw101 Machine: 002FBF7D4C00
Tprof command was:
    tprof -x sleep 60
Trace command was:
    /usr/bin/trace -ad -L 1000000 -T 500000 -j 000,001,002,003,38F,005,006,134,139,5A2,465,00A,234 -o -
Total Samples = 48008
Total Elapsed Time = 60.01s
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Process                                Freq  Total Kernel   User Shared  Other
=======                                ====  ===== ======   ==== ======  =====
wait                                      8  99.69  99.69   0.00   0.00   0.00
/usr/bin/tprof                            1   0.14   0.00   0.00   0.13   0.00
/home/db2inst1/sqllib/bin/db2fm
                                          6   0.04   0.02   0.00   0.02   0.00
/etc/syncd                                2   0.03   0.03   0.00   0.00   0.00
/home/dasusr1/das/bin/db2fm               6   0.01   0.01   0.00   0.00   0.00
db2hmon                                   1   0.01   0.01   0.00   0.00   0.00
db2agent                                  1   0.01   0.01   0.00   0.00   0.00
/home/db2inst1/sqllib/adm/db2set
                                          6   0.01   0.01   0.00   0.00   0.00
/usr/bin/sh                               6   0.01   0.01   0.00   0.00   0.00
r/WebSphere/AppServer/java/bin//java      3   0.01   0.01   0.00   0.00   0.00
db2disp                                   1   0.00   0.00   0.00   0.00   0.00 

No comments:

Post a Comment