如何从 Windows 机器运行 Jprofiler 到远程 Linux JVM

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10014744/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 05:37:02  来源:igfitidea点击:

How to run Jprofiler from Windows machine to Remote Linux JVM

linuxjprofiler

提问by Sreeman

Kindly let me know how to run Jprofiler from Windows machine to Remote Linux JVM.

请让我知道如何从 Windows 机器运行 Jprofiler 到远程 Linux JVM。

Thanks a lot in advance.

非常感谢。

回答by Ingo Kegel

1) Go to the download page, download the .tar.gz distribution and extract it on the remote Linux machine.

1) 转到下载页面,下载 .tar.gz 发行版并在远程 Linux 机器上解压。

2) On the remote Linux machine, start the command line utility bin/jpintegrate, then follow the steps in the command line wizard.

2) 在远程 Linux 机器上,启动命令行实用程序bin/jpintegrate,然后按照命令行向导中的步骤进行操作。

3) Transfer the generated JProfiler config file to your local Windows machine.

3) 将生成的 JProfiler 配置文件传输到您的本地 Windows 机器。

4) On your local Windows machine, start the JProfiler GUI and import the config file with Session->Import Session Settings

4) 在本地 Windows 机器上,启动 JProfiler GUI 并使用 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.

5) 在远程 Linux 机器上启动分析的 JVM,并在 Windows 机器上的 JProfiler GUI 中启动导入的会话。

回答by Saman Salehi

for remote connect to jprofiler you can following this steps:

要远程连接到 jprofiler,您可以按照以下步骤操作:

  1. download linux version of jprofiler.
  2. install it on linux system.
  3. 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.
  4. install the jprofiler in local machine like windows.
  5. 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
  1. 下载 linux 版本的 jprofiler。
  2. 安装在linux系统上。
  3. 转到文件夹 bin 并运行 ./jpenable。按照向导选择要分析的 jvm 的进程 ID。之后它会给你一个端口号。
  4. 在 Windows 等本地机器上安装 jprofiler。
  5. 在开始中心菜单中选择快速连接并选择另一台计算机。在步骤“3”中输入主机地址和端口号即可远程连接jprofiler

回答by Mitendra

For remote connect to jprofiler on Windows with remote machine JVM(Centos 7)

使用远程机器 JVM(Centos 7) 远程连接到 Windows 上的 jprofiler

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

  2. Untar the .tar.gz file.

    tar xvzf folder_name

  3. Go to /bin path.

    cd folder_name/bin

  4. Run following command to enable profiling agent to connect JVMTI data on a specific port.

    ./jpenable

  5. 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).

  6. Select tthe GUI mode or offline mode. Enter 1. (This option does not exist on old version).

  7. Enter the port on which you want to listen. (Eg 33668)

  8. Now your VM is ready for connection from Windows jprofiler.

  1. 在 centos 上下载 (.tar.gz) Linux 版本的 jprofiler。Windows 和远程机器 jprofiling 代理的版本相同。如果 bot 版本不同,则它不会在 Windows 上使用 jprofiler 创建。

  2. 解压 .tar.gz 文件。

    tar xvzf 文件夹名称

  3. 转到 /bin 路径。

    cd 文件夹名称/bin

  4. 运行以下命令以启用分析代理以连接特定端口上的 JVMTI 数据。

    ./jpenable

  5. 在运行上述命令时,它会给出在 JVM 上运行的所有进程列表。选择分析所需的过程。(例如,让我必须从 8 个进程中流式传输第 6 个进程。然后输入 6)。

  6. 选择 GUI 模式或离线模式。输入1。(旧版本不存在此选项)。

  7. 输入要侦听的端口。(例如 33668)

  8. 现在您的 VM 已准备好从 Windows jprofiler 进行连接。



Connection setting on window jprofiler

窗口 jprofiler 上的连接设置

  1. Click on start center.

  2. Select a new Session.

  3. Click on attach and select “Attach to remote machine” radio button.

  4. Set ssh tunnel from the drop down.

  5. Slick edit button and configure the direct ssh tunneling connection.

  6. Click next and provide the VM credential.

  7. Manually configure the profiling port. It should be defined at the time of configuring profiling agent.

  1. 点击开始中心。

  2. 选择一个新会话。

  3. 单击附加并选择“附加到远程机器”单选按钮。

  4. 从下拉菜单中设置 ssh 隧道。

  5. 光滑的编辑按钮并配置直接 ssh 隧道连接。

  6. 单击下一步并提供 VM 凭据。

  7. 手动配置分析端口。它应该在配置分析代理时定义。

16.Click finish.

16.点击完成。

17.Select ‘ok' button and enter the key you received through mail.

17.选择“确定”按钮并输入您通过邮件收到的密钥。

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

  2. Click ‘ok' button. Congratulation !! Now your remote VM is connected with your Windows jprofiler.

  1. 如果凭据正确,则会出现以下提示。单击“配置”按钮。选中“CPU 数据”、“调用跟踪器”和“分配堆栈”复选框。单击确定。

  2. 单击“确定”按钮。恭喜!!现在您的远程 VM 已与您的 Windows jprofiler 连接。