HP PAK Performance Analysis Tools User's Guide

Chapter 1 7
Overview of HP PAK Tools
Using Puma
Using Puma's Shell Script Interface
You can invoke Puma from a shell or shell script to execute a single
command. Enter the command puma and the name of the desired
command as an option, that is, precede the command name with a
hyphen. You can also supply arguments to the command option.
For example, to invoke and collect performance data on my_program
(with arguments) from a shell or shell script, use a command like the
following:
puma -monitor -invoke my_program arg1 arg2
As another example, suppose that my_program is already running,
First, you need to find the Process ID (PID) with a command like the
following:
ps | grep my_prog
1054
Then, you can invoke the following command line from a shell or shell
script:
puma -monitor -existing 1054 -executable my_program
Notice that you cannot specify arguments for an existing process.
For More Information
See Chapter 3, “Puma Command Quick Reference,” for more information
on Puma commands.
See Chapter 2, “Puma Concepts,” for more information on how Puma
collects data and generates statistics.
See the puma(l) man page.
A Sample Program
You can experiment with Puma by using the sample program,
vanderbilt, that is included with HP PAK. This program is used in the
online tutorial that illustrates most of Puma's features. Select
Help:Tutorial from the main window of Puma's graphical user
interface. vanderbilt should be installed in the following location:
/opt/langtools/hppak/examples/vanderbilt