<% @path = '/etc/monit/monit.d/monit-selenium_grid_hub.conf' %> <% start_program = "/bin/bash -l -c '#{rubber_env.selenium_grid_hub_dir}/startup.sh'" stop_program = "/bin/bash -l -c 'cat #{rubber_env.selenium_grid_hub_dir}/hub.pid | xargs kill; exit 0'" %> check process selenium_grid_hub with pidfile <%= rubber_env.selenium_grid_hub_dir %>/hub.pid group selenium_grid_hub start program = "<%= start_program %>" stop program = "<%= stop_program %>" if totalmem > <%= rubber_env.selenium_grid_hub_max_heap_in_mb.to_i + rubber_env.selenium_grid_hub_permgen_in_mb.to_i %>.0 MB for 5 cycles then restart