Command line tool is another way to control profiling, in addition to the profiler UI and API.
It has much in common with API and may also be used for automated profiling. You may prefer the command line tool to API in some cases as an easier solution not requiring any Java code to be written. However the command line tool provides less functionality than the API.
Also, the command line tool may be useful in remote profiling when you only have console access to the remote machine and no UI is available.
Run the tool with the following command:
java -jar <Profiler Installation Directory>/lib/yjp-controller-api-redist.jar <options>
To get list of available options, run:
java -jar <Profiler Installation Directory>/lib/yjp-controller-api-redist.jar
Also consider connecting to a remote application from a locally running profiler UI, which may be a better approach.