If you started the program from the command line and put it in the background, its PID will be printed to standard output by the shell. Otherwise, you can determine the program's PID by typing the following command.
% ps -ef | grep program-name
% collect -P pid collect-options
The collector options are described in Data Collection Options. For information about clock profiling, see Clock Profiling with the -p option. For information about hardware clock profiling, see Hardware Counter Profiling with collect -h .