Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Nadine (not registered) on Tue, 2011-09-27 16:25.

Hello,

 I have an issue that perhaps you can assist me with. I have the following snippen in my monitrc file:

check process myjavaapp with pidfile /tmp/myapp.pid

start program = "/etc/init.d/myjavaapp start" with timeout 40 seconds

stop program = '/etc/init.d/myjavaapp stop"

if mem > 100 MB for 5 cycles then restart

When the 100 MB threshold is reached by the application for 5 consecutive cycles, the application is restarted. When the application comes back up, if the memory is still over 100 MB, Monit doesn't wait for 5 cycles to restart, it reboots the aplication right away. Is there a way to get around this?

Ideally, I want Monit to restart the cycle counter for this process after the reboot, and not reboot again for 5 more cycles. Please let me know if you have any suggestions that I could try!

Your help is greatly appreciated!
Sincerely, Nadine

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.