Hello users:
Thank you for all the answers. I have made some changes to my command: I
added a space before the character and I explicitly piped the stdout
and stderr to my log file to avoid missunderstandings. The command looks
like this now:
nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS
LS,
Marco scribbled on 2009-07-03:
Hello users:
nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS
JMXServer.JMXServerDispatcher $PORT /dev/null $LOG_FILE
2$LOG_FILE
Change this in $PORT - $LOGFILE 21
- closes STDIN
Any thoughts? other suggestions?
can't you use the init.d
Hello Users:
I have a problem with an event handler of mine. The handler starts a java
daemon-like program which loops forever waiting for connections and performs
JMX queries against our java applications.
The problem is that the handler times out when it is run by nagios. This is
what I see in
That is exactly what I am doing (or trying to do with) the character at
the end of my command. But it does not appear to be working, the command
looks like this:
nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/null 21
$LOG_FILE
Any suggestions? Am I missing something else?
Perhaps instead of using a java daemon to do JMX queries, you could use
the check_jmx nagios plugin. (Available at the monitoring exchange
site.) I've been using it in our Nagios system, and it's been working
nicely (after some enhancements).
I'm in the process of adopting and enhancing the
First, put a space in front of that . Otherwise, it may be treated as
part of the variable name.
Second, I believe that the 21 needs to come AFTER the redirection to
$LOG_FILE. Otherwise, what you are doing is redirecting stderr to stdin
- which is still the console - and THEN redirecting
Marco Tirado wrote:
Hello Users:
I have a problem with an event handler of mine. The handler starts a java
daemon-like program which loops forever waiting for connections and performs
JMX queries against our java applications.
The problem is that the handler times out when it is run by
On Jul 2, 2009, at 9:16 AM, Marco Tirado wrote:
That is exactly what I am doing (or trying to do with) the
character at the end of my command. But it does not appear to be
working, the command looks like this:
nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT /dev/
null 21