问题
Kindly let me know how to run Jprofiler from Windows machine to Remote Linux JVM.
Thanks a lot in advance.
回答1:
1) Go to the download page, download the .tar.gz distribution and extract it on the remote Linux machine.
2) On the remote Linux machine, start the command line utility bin/jpintegrate
, then follow the steps in the command line wizard.
3) Transfer the generated JProfiler config file to your local Windows machine.
4) On your local Windows machine, start the JProfiler GUI and import the config file with Session->Import Session Settings
5) Start the profiled JVM on the remote Linux machine and the imported session in the JProfiler GUI on the Windows machine.
回答2:
for remote connect to jprofiler you can following this steps:
- download linux version of jprofiler.
- install it on linux system.
- go to folder bin and run ./jpenable. follow the wizard for choose the process id of jvm you want to profiled. after that it give you a port number.
- install the jprofiler in local machine like windows.
- in start center menu choose quick attach and chose the another computer. enter the host address and port number in step "3" then you can remotely connect to jprofiler
回答3:
For remote connect to jprofiler on Windows with remote machine JVM(Centos 7)
Download (.tar.gz) the Linux version jprofiler on centos. Both the Windows and remote machine jprofiling agent are of the same version. If bots are not same version then it will not create with the jprofiler on Windows.
Untar the .tar.gz file.
tar xvzf folder_name
Go to /bin path.
cd folder_name/bin
Run following command to enable profiling agent to connect JVMTI data on a specific port.
./jpenable
On running the above command it gives all list of process running on the JVM. Select the process which you required for profiling. (eg. lets i have to stream 6th process out of 8 process. Then enter 6).
Select tthe GUI mode or offline mode. Enter 1. (This option does not exist on old version).
Enter the port on which you want to listen. (Eg 33668)
Now your VM is ready for connection from Windows jprofiler.
Connection setting on window jprofiler
Click on start center.
Select a new Session.
Click on attach and select “Attach to remote machine” radio button.
Set ssh tunnel from the drop down.
Slick edit button and configure the direct ssh tunneling connection.
Click next and provide the VM credential.
Manually configure the profiling port. It should be defined at the time of configuring profiling agent.
16.Click finish.
17.Select ‘ok’ button and enter the key you received through mail.
If the credential is correct, following prompt will show up. Click “configure” button. Select “CPU data”, “Call tracer” and “allocation stack” check box. Click ok.
Click ‘ok’ button. Congratulation !! Now your remote VM is connected with your Windows jprofiler.
来源:https://stackoverflow.com/questions/10014744/how-to-run-jprofiler-from-windows-machine-to-remote-linux-jvm