Java Unix 中的 jvisualvm
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19534404/
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
jvisualvm in Unix
提问by zdhim
We started to check the performance of my application as its getting slow after some time. I am using jvisualvm to observe the cause. Can anyone tell how can i use jvisualvm in Unix as in Windows we can check it through UI. Can we have the same view in Unix also.
我们开始检查我的应用程序的性能,因为它在一段时间后变慢了。我正在使用 jvisualvm 来观察原因。谁能告诉我如何在 Unix 中使用 jvisualvm,就像在 Windows 中一样,我们可以通过 UI 进行检查。我们是否也可以在 Unix 中拥有相同的视图。
Lets my path to jvisualvm is /Prj/tools/java/bin/jvisualvm
让我的 jvisualvm 路径是 /Prj/tools/java/bin/jvisualvm
When i use help,
当我使用帮助时,
Usage: /Prj/tools/java/bin/../lib/visualvm//platform7/lib/nbexec {options} arguments
General options:
--help show this help
--jdkhome <path> path to Java(TM) 2 SDK, Standard Edition
-J<jvm_option> pass <jvm_option> to JVM
--cp:p <classpath> prepend <classpath> to classpath
--cp:a <classpath> append <classpath> to classpath
Core options:
--laf <LaF classname> use given LookAndFeel class instead of the default
--fontsize <size> set the base font size of the user interface, in points
--locale <language[:country[:variant]]> use specified locale
--userdir <path> use specified directory to store user settings
Module reload options:
--reload /path/to/module.jar Installs or reinstalls a module JAR file.
回答by Thihara
Goto the JDK bin folder and run the jvisualvm
binary by typing jvisualvm
and pressing enter.
转到 JDK bin 文件夹并jvisualvm
通过键入jvisualvm
并按 Enter来运行二进制文件。
回答by Mateusz Dymczyk
Just type in your terminal:
只需在您的终端中输入:
/Prj/tools/java/bin/jvisualvm
And hit enter. If you want to pass some arguments or options (like JDK home) put it after "jvisualvm" in the command above using the format provided by help.
然后按回车。如果您想传递一些参数或选项(如 JDK home),请使用 help 提供的格式将其放在上面命令中的“jvisualvm”之后。
回答by G.S
You can setup the remote connectivity to the unix box from the jvisualvm
.
您可以从jvisualvm
.
Else, you can set the DISPLAY
parameter of the unix to your desktop IP [like DISPLAY=<your IP>:0.0;export DISPLAY
]
Note:Use the unix command according to your SHELL
否则,您可以将DISPLAY
unix的参数设置为您的桌面 IP [like DISPLAY=<your IP>:0.0;export DISPLAY
]
注意:根据您的情况使用 unix 命令SHELL
回答by Manoj
- Use Mobaxterm tool to connect to Linux box.
- set display variable as: setenv DISPLAY :0.0
- go to /bin
- Launch as: ./jvisualvm
- 使用 Mobaxterm 工具连接到 Linux box。
- 将显示变量设置为:setenv DISPLAY :0.0
- 转到/bin
- 启动为:./jvisualvm
I hope this works
我希望这有效