Profiling Remote Application W/O XServer
This tutorial provides instructions on how to profile an application running on remote Linux machine from a local windows machine. AppPerfect Java Profiler must be installed on both local and remote machines.
Installation on Windows Machine
- Please uninstall any previous version of AppPerfect Java Profiler.
- Please start the installation by double-clicking the downloaded setup executable for AppPerfect Java Profiler and you should be presented with the install window.
- Read the instructions provided and click on the Next button.
- Please read the agreement and if you agree, select 'I accept the agreement' and click on the next button.
- Please enter the details required along with your evaluation key provided and click Next.
- If the key you have entered is valid, you would be presented with screen asking where you want to install product.
- Please enter the appropriate location to install AppPerfect Java Profiler.
- If you wish to create a shortcut, please leave the default settings and click Next.
- After the installation is complete, you would be presented with window showing message confirming install.
- Please click Finish to complete the installation.
Installation on Linux Machine without X-Server
- Please uninstall any previous version of AppPerfect Java Profiler.
- Please go to the directory where you have downloaded/copied the AppPerfect Java Profiler linux installable to and enter the following command to start the installation in non-UI mode.
Where /AppPerfect/Profiler is the destination directory where you want to install AppPerfect Java Profiler.sh AppPerfectProfilerxx_lnx.sh -q -dir /AppPerfect/Profiler - Once the installation begins, you would be presented with the licence agreement. Please read the agreement and if you agree, type yes and press enter.
....
Quartz Scheduler (http://www.quartzscheduler.org/)
Remote Tea ONC/RPC for Java (http://www.plt.rwth-aachen.de/ks/english/remotetea.html)
SmsJ SMS library for the Java platform (http://sourceforge.net/projects/smsj/)
StrutsTestCase for JUnit (http://strutstestcase.sourceforge.net/)
Do you agree to the above license terms? [yes or no](no): yes - It will then ask you to enter the username. Please enter the name you wish to register AppPerfect Java Profiler with.
- It will then ask you to enter the Company Name. Please enter the company name you wish to register AppPerfect Java Profiler with.
- It will then ask you to enter the license key. Please enter the license key provided at the time of downloading AppPerfect Java Profiler.
- It will then ask you if you wish to create links; if yes, please leave the default and press enter or else type 'no' and press enter.
================================================
Confirmation
================================================
Do you want to create links ?
================================================
Choose options [y n](yes): - If you selected yes for the above, it will ask you to enter the link folder location. Please enter the location where you wish the links to be created.
- For the service port, please leave the default (8834) and press enter.
- For the username to start service, please ensure that the default username provided has the permission to start services in linux. If so, please leave the default username and press enter. If the default username does not have the permission to start services, please provide the username which has the required permissions.
- If everything goes smoothly you would see the following messages:
....
ServiceAction.install() ... appservice successfully installed.
ServiceAction.install() ... appservice successfully started. - The installation is complete.
Remote Profiling
For this tutorial we assume following scneario for Remote Profiling in AppPerfect Java Profiler
Description | Local System | Remote System |
Operating System | Windows | Linux |
Location of AppPerfect Java Profiler | C:\AppPerfect\Profiler | /AppPerfect/Profiler |
- Please launch AppPerfect Java Profiler on the local (Windows) machine.
- You would be presented with the welcome screen. Please click on Java Profiler.
- Create a project in local AppPerfect Java Profiler for remote profiling Tomcat server. Please select File -> New.
- Please enter the project name and location of project or you can leave default settings. Please select 'Target Application/AppServer runs on a remote machine. Under Host Name / IP address, please provide the ip address of the linux machine on which AppPerfect Java Profiler was installed. Click Next.
NOTE: The Appperfect Java Profiler product Service "APPProfiler" must be running at port 8834 on remote (Linux) machine. To start the service, type the following at the terminal:
$ sh /AppPerfect/Profiler/wrapper/start_service. - Leave the default Import settings and click Next.
- Leave the default Source settings and click Next.
- For Java Settings, under Remote Java Environment, please provide '/AppPerfect/Profiler/jre' as the Java Home and click Validate Java to ensure the path is correct. Then click Next.
- You can provide environment settings. If your application is local desktop application, provide proper classpath here. Since it's a server application leave blank. Click Next.
- Under Target settings, we have to provide details of remote server. Please click on 'Go to AppServer Settings'. Under AppServer Settings, select Specify AppServer Settings and provide startup file, home etc. paths of the remote machine. Please select 'Launch Server automatically (when required)'.
- Please click on 'Validate AppServer Settings' to ensure that the details provided are correct. If successful, please click Finish.
- You will be provided with the Project Properties dialog.
- Details of the project properties dialog:
Profiling Type: Select the mode of profiling, leave Development mode selected.
Profiling Options: You can select profiling options, leave all selected.
Instrumentation Options: You can select Instrumentation type, leave Dynamic instrumentation selected.
Click Ok.
- Select Project -> Run to start profiling. It will present you with an update confirmation stating that the remote tomcat startup file has been modified to include settings specific to AppPerfect JavaProfiler. Click Ok.
- It will then remotely launch Tomcat server and start profiling. As soon as Tomcat is started, you should see the profiling data in the local AppPerfect JavaProfiler application.
AppPerfect Java Profiler
The steps henceforth will be same in case of Server profiling, hence please refer to the "Profiling Server Application" tutorial for further details.