Tuesday, February 22, 2011

Making VisualVM as a Windows service on remote server

I am often Adding a remote JMX connection to the VisualVM to do monitoring work to capture JVM performance status. however, some of application are running as a windows service remotely, so i can not use Btrace Workbench then. if you do not want to change the Windows service back to console mode, then here is what I solved mine:

PS:Making sure Latest JDK1.6 installed for getting jVisualVM and Btrace, more info please refer to https://visualvm.dev.java.net/pluginscenters.html, your JAVA_HOME can be a separate one for your java application.

Step1: Remote to the application server using a console mode: mstsc /console /v:(For Winows server 2003 or winXP sp2) or admin mode:mstsc /admin /v:(Windows XP Service Pack 3, Windows Vista Service Pack 1 and Windows Server 2008 or later), why? please see this link

Step2: Use AppToService.exe to create VisualVM as a Windows service
Type such command line in cmd:
AppToService.exe /Install "C:\Program Files\Java\jdk1.6.0_24\bin\jvisualvm.exe" /AbsName:"VisualVM" /Interact:1

Step3: Start the "VisualVM" in Services

So you can see the VisualVM will launch on your remote desktop, then the Java process on that server running as a service can be monitoring as a local process.



Some Useful References:
http://blogs.sun.com/nbprofiler/entry/monitoring_java_processes_running_as
http://vicevoice.blogspot.com/2009/09/vaas-visualvm-as-service.html
http://www.microsoftnow.com/2008/01/no-more-mstscexe-console.html
More update from Sun blog: https://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as My Friend Roy and Rudy's help as well:)

Thursday, February 17, 2011

消失的纯白2011--A flash Game of my good Friend

转载我一个好朋友自创的Flash Game,在新的一年里,祝福他和他的家人--坚强,幸福!