Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015

To Collect Data From a Running Process That Is Not Under the Control of dbx

  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 command:

    % ps -ef | grep program-name
  2. Attach to the process.

    From dbx, type the following command:

    (dbx) attach program-name pid

    If dbx is not already running, type the following command:

    % dbx program-name pid

    Attaching to a running process pauses the process.

    See the manual Oracle Solaris Studio 12.4: Debugging a Program With dbx for more information about attaching to a process.

  3. Start data collection.

    From dbx, use the collector command to set up the data collection parameters and the cont command to resume execution of the process.

  4. Detach from the process.

    When you have finished collecting data, pause the program and then detach the process from dbx.

    From dbx, type the following command:

    (dbx) detach