问题描述
我使用Java 1.6 u 20在Windows Server 2003下运行GlassFish 3.0.1作为Windows服务,我一般都很高兴。
I am running GlassFish 3.0.1 as a windows service under Windows Server 2003 with Java 1.6 u 20, and am generally happy.
我希望能够在此JVM上使用VisualVM并使用一起使用作为起点,但从
I would like to be able to use VisualVM on this JVM and used Unable to use JConsole with Tomcat running as windows service as a starting point, but starting with
PsTools\PsExec.exe -i -s "C:\Program Files\Java\jdk1.6.0_20\bin\jvisualvm.exe"
导致jvisualvm.exe和nbexec.exe进程显示在任务管理器中,SYSTEM作为用户,但我没有看到程序中的任何GUI,就像我手动运行时一样像我一样。我从Windows 7使用远程桌面登录,以防万一。
results in a jvisualvm.exe and a nbexec.exe process showing up in Task Manager with SYSTEM as the user but I do not see any GUI from the program as I do when I run it manually as myself. I am logged in with Remote Desktop from Windows 7 in case that makes any difference.
其他有趣点:
at 10:55 /interactive cmd.exe
报告一个已添加新作业,但未在10.55打开CMD窗口。
reports a new job has been added, but does not open a CMD window at 10.55.
如何将VisualVM注册为服务的说明报告服务启动但没有GUI显示起来。
The description of how to register VisualVM as a service reports the service to start but no GUI shows up. http://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as
有没有人让它在Windows Server 2003下运行?
Have anybody gotten this to run under Windows Server 2003?
推荐答案
这种方式我能够让这个工作是确保您远程桌面到服务器的控制台会话。
The way I'm able to get this to work is to make sure that you remote desktop to the server's "console" session.
简单地说,当您打开mstsc.exe时,将文本/ admin附加到您尝试连接的计算机名称。例如,如果您尝试连接到名为FOO的服务器,则在mstsc.exe的计算机名称文本框中输入FOO / admin。
Simply put, when you open mstsc.exe append the text " /admin" to the computer name you are trying to connect to. For instance, if you were trying to connect to a server called "FOO", then in the Computer name text box in mstsc.exe, you would enter "FOO /admin".
连接并登录服务器后,您可以执行PsExec命令。然后,您应该看到Visual VM,其中包含您尝试连接的GlassFish进程。
After connecting and logging in to the server, you can execute your PsExec command. You should then see Visual VM with the GlassFish process you are trying to connect to.
有关在Windows中连接到远程桌面的控制台会话的详细信息,请查看在如何连接到控制台部分。
For more info about connecting to the console session with remote desktop in Windows, have a look at the "How to Connect to the Console" section http://support.microsoft.com/kb/278845.
另外,对于那些寻找PsExec.exe的人,你可以从Microsoft的PsTools软件包中获取它来自technet.microsoft.com/en-us /sysinternals/bb897553.aspx。
Also, for those looking for PsExec.exe, you can get it from the PsTools package from Microsoft at technet.microsoft.com/en-us/sysinternals/bb897553.aspx.
这篇关于如何在Windows Server 2003下的本地系统帐户下运行jvisualvm.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!