Hello users: <br><br>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: <br>
<br><span style="font-family: courier new,monospace;">nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer.JMXServerDispatcher $PORT </dev/null >>$LOG_FILE 2>>$LOG_FILE &</span><br><br>The result however is much worst in this case, instead of seeing a timeout in the logs, the whole nagios process hangs (that is the logs freeze and no new tests are performed). I believe these issues have to do with how nagios handles the "&" character or processes in the background in general. <br>
<br>Any thoughts? other suggestions?<br><br><br>//Marco<br> <br><br>By the way David: <br><br>We have used the check_jmx plugin in the past with out own modifications, however we have a very large system with around 1000 JMX queries running each 5 minutes and the check_jmx solution is not very scalable. If we use check_jmx that means starting 1000 JVM (and all the resources that come with it) every five minutes, that consumes a lot of resources and generates a lot of load on the monitoring server. Our system is continuously growing and new JMX queries are added quite frequently. <br>
<br>To solve that issue we have developed a JMX server that takes care of all the JMX queries and a light weight client that is run by nagios. This is a much more scalable solution that decouples the whole JMX processing from nagios (the JMX server can be running in any machine not only the nagios server). <br>
<br>Cheers<br><br><br><br><br><br><div class="gmail_quote">On Thu, Jul 2, 2009 at 4:43 PM, Marc Powell <span dir="ltr"><<a href="mailto:marc@ena.com">marc@ena.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On Jul 2, 2009, at 9:16 AM, Marco Tirado wrote:<br>
<br>
><br>
> That is exactly what I am doing (or trying to do with) the "&"<br>
> character at the end of my command. But it does not appear to be<br>
> working, the command looks like this:<br>
><br>
> nohup $JAVA_CMD -cp $CLASSPATH $JVM_OPTIONS JMXServer $PORT </dev/<br>
> null 2>&1 >> $LOG_FILE&<br>
<br>
</div>Do you really intend to set the output of /dev/null as the STDIN for<br>
nohup? I expect you meant to use '>/dev/null'.<br>
<br>
--<br>
<font color="#888888">Marc<br>
</font><div><div></div><div class="h5"><br>
<br>
------------------------------------------------------------------------------<br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</div></div></blockquote></div><br>