【问题标题】:How can I let jprofiler find the PID of running tomcat server?如何让 jprofiler 找到正在运行的 tomcat 服务器的 PID?
【发布时间】:2016-06-13 11:57:41
【问题描述】:

我在远程 linux 服务器上提取了 jprofiler tar.gz。在尝试了 bin/jpenable 命令后,我得到了:

'No unprofiled JVMs found.'

所以我去寻找正在运行的 tomcat 服务器的 PID,我想我在 var/run 目录中找到了它。一个名为 tomcat7.pid 的文件 于是我回到jprofiler的源文件夹试了一下:jpenable --pid=[前面提到的pid文件中的id] 如以下文档第 277 页所述:http://resources.ej-technologies.com/jprofiler/help/doc/help.pdf 并得到:

No JVM with PID [the pid] found that is running as the same user.

因此,由于我以 ubuntu 身份登录的用户我尝试使用用户 tomcat7 登录,但即使在放弃了正确的密码(我们使用 sudo 更改)后,我仍然以 ubuntu 身份登录(由 whoami 命令确认) 上面的问题依然存在。

如何让这个 jprofiler 找到我需要的 jvm??

【问题讨论】:

  • 您的 Tomcat 是否配置为使用不同的 TEMP 目录?

标签: linux tomcat jprofiler


【解决方案1】:

已修复。 我们将 tomcat 作为服务运行,因此我们需要在 jvm 启动时添加代理路径。将以下内容添加到 /usr/share/tomcat7/bin/setenv.sh :

-agentpath:/opt/jprofiler/jprofiler7/bin/linux-x64/libjprofilerti.so=port={port we want}

然后在 aws 上启用该端口。

【讨论】:

    猜你喜欢
    • 2023-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-26
    • 1970-01-01
    • 2014-10-16
    • 2013-02-02
    • 1970-01-01
    相关资源
    最近更新 更多