jstatd,命令未找到CentOS 7

时间:2022-05-26 01:50:00

I am trying to monitor VisualGC from my workstation.
Command: java -version

我试图从我的工作站监视VisualGC。命令:java -version

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

So i created a policy file and tried starting jstatd like below.

所以我创建了一个策略文件并尝试启动jstatd,如下所示。

file name: jstatd.all.policy

文件名:jstatd.all.policy

grant codebase "file:${java.home}/../lib/tools.jar" {
   permission java.security.AllPermission;
};

Command tried: jstatd -J-Djava.security.policy=jstatd.all.policy

命令尝试:jstatd -J-Djava.security.policy = jstatd.all.policy

error: -bash: jstatd: command not found

错误:-bash:jstatd:找不到命令

command: rpm -qa | grep java
Output:

命令:rpm -qa | grep java输出:

tzdata-java-2017c-1.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
java-1.8.0-openjdk-headless-1.8.0.151-5.b12.el7_4.x86_64
java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64
python-javapackages-3.4.1-11.el7.noarch

Also, on visualvm, Tab: Visual GC, I am seeing "Not supported for this JVM"

另外,在visualvm上,Tab:Visual GC,我看到“这个JVM不支持”

1 个解决方案

#1


2  

You've probably solved this by now, but for anyone else finding this in search as I did:

你现在可能已经解决了这个问题,但是对于其他人在搜索中发现这个问题,我做了:

jstatd in CentOS 7 is now part of the package java-1.8.0-openjdk-devel

CentOS 7中的jstatd现在是java-1.8.0-openjdk-devel包的一部分

yum install java-1.8.0-openjdk-devel

#1


2  

You've probably solved this by now, but for anyone else finding this in search as I did:

你现在可能已经解决了这个问题,但是对于其他人在搜索中发现这个问题,我做了:

jstatd in CentOS 7 is now part of the package java-1.8.0-openjdk-devel

CentOS 7中的jstatd现在是java-1.8.0-openjdk-devel包的一部分

yum install java-1.8.0-openjdk-devel