Sun Studio 12 Update 1: Performance Analyzer

ProcedureTo Collect Data From a Running Process Using the collect Utility

  1. Determine the program’s process ID (PID).

    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.


    % ps -ef | grep program-name
    
  2. Use the collect command to enable data collection on the process, and set any optional parameters.


    % collect -P pid collect-options
    

    The collector options are described in Data Collection Options. For information about clock-based profiling, see -p option. For information about hardware clock profiling, see -h option.