On Oracle Solaris, you can collect data from any running process in Performance Analyzer or from the command line. On Linux, profiling a running process works reliably on single-threaded applications only. Because the JVM is multithreaded, you cannot profile Java applications on Linux.
If you want to profile a running process from the command line, see the collect(1) or dbx(1) man pages.
To profile a running process in Performance Analyzer do one of the following:
Click Profile Running Process in the Welcome screen.
Choose File → Profile Running Process (Alt-F, R).
Select the process you want to profile in the Profile Running Process dialog box and click Run if you want to use the default options. Otherwise, you can specify experiment options in the General tab, and select the types of data you want to collect in the Data to Collect tab.
Press F1 while the dialog is open to view the help for the dialog.
The Output tab displays output from the Collector and any output from your process. Click Terminate when you want to stop profiling. Performance Analyzer prompts you to open the experiment.