You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Elliot Metsger <em...@jhu.edu> on 2005/08/24 01:37:38 UTC

[daemon] using procrun on windows to run jstatd

Hi all,

Has anyone been able to use procrun to successfully install jstatd (a 
JVM monitoring tool distributed with Java 1.5: 
http://java.sun.com/performance/jvmstat/) as a Windows service?

We want to use jstatd to monitor our Tomcat 5.5.9 server running on Sun 
Java 5.

I'm using the tomcat5.exe binary that shipped with Tomcat, which seems 
to be a pre-build procrun.exe, in order to avoid building from source on 
a Windows box.

My //IS// command looks like:
D:\tomcat\bin\tomcat5.exe //IS//JstatdService2 
--Jvm="%JAVA_HOME%jre\bin\server\jvm.dll" --Description="Java Monitoring 
Process.  See http://java.sun.com/performance/jvmstat/" 
--DisplayName="JVM Monitoring Service" --User=administrator 
--Password=foo --JvmOptions="-Djava.security.policy=C:\Documents and 
Settings\emetsge1\jstatd.policy;-Xrs;-verbose" 
--Classpath="%JAVA_HOME%lib\tools.jar" 
--StartClass="sun.tools.jstatd.Jstatd" 
--Install="D:\tomcat\bin\tomcat5.exe" --StartMode="jvm" 
--LogPath="C:\Documents and Settings\emetsge1" 
--LogPrefix="jstatd_service" --LogLevel=DEBUG --StdOutput="C:\Documents 
and Settings\emetsge1\jstatd_service_stdout" --StdError="C:\Documents 
and Settings\emetsge1\jstatd_service_stderr"

I can get the service to start by running tomcat5 //TS//JstatdService2 
but then it quits with no error message.  sc query jstatdservice2 
doesn't give me any clues.  The exit code is 0.

I can run jstatd manually on the command line using java, so I am pretty 
sure my command line args etc are correct.  I've attempted to switch the 
StartMode to java, and to try different JvmOptions (e.g. -Xrs) but no 
luck.  I've added the '-verbose' flag as a jvm opton but the output 
doesn't provide any clues, other than the service successfully starts up.

It appears the service successfully starts, then just quits.

Any ideas?  Should I compile procrun from source?  Or would I be better 
off asking the jstatd/jvmstat folks at Sun?

Thanks for any help,
Elliot

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org