开发者

How do you run jvisualvm.exe under the local system account under Windows Server 2003?

开发者 https://www.devze.com 2023-01-04 16:15 出处:网络
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.

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.

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"

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.

Other interesting points:

at 10:55 /interactive cmd.exe

r开发者_开发知识库eports a new job has been added, but does not open a CMD window at 10.55.

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

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.

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

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.

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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消