Go to main content
Oracle® Developer Studio 12.5: Performance Analyzer

Exit Print View

Updated: June 2016
 
 

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. Invoke the collect command with the –P PID to collect data.
    • Alternatively, you could do it manually using the following steps:
      1. 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 Developer Studio 12.5: Debugging a Program with dbx for more information about attaching to a process.

      2. 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.

      3. 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