I want to start jstatd on my Debian server as a daemon process (which is what I thought it should do on its own ...) but I can't seem to get it to work.
If I run it from the command line, it starts fine, but blocks the terminal session. I can then use VisualVM to monitor the processes remotely (yeah!). But as soon as I hit ^c to get control of the session, jstatd terminates.
Okay, then lets do it via an init.d script!
Again, it works fine, but my terminal session is still blocked.
my start command is
/usr/bin/jstatd -J-Djava.security.policy=/usr/lib/jvm/jre1.7.0_10/bin/jstatd.all.policy
and, as said, works fine as I can see the processes once I execute the command.
In the init.d script, it looks like:
#!/bin/sh
set -e
NAME=jstatd
PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/bin/jstatd
DAEMON_OPTS="-J-Djava.security.policy=/usr/lib/jvm/jre1.7.0_10/bin/jstatd.all.policy
case "$1" in
start)
start-stop-daemon --start --quiet --pidfile $PIDFILE -- exec $DAEMON -- $DAEMON_OPTS
...
Any ideas what might be causing such behaviour?