on restarts and terminations, god doesn't kill non-daemon processes it
has started.  i have to kill the manually. system is 64-bit Ubuntu
9.10.

>sudo god check

yields:

using event system: netlink
starting event handler
forking off new process
forked process with pid = 12693
killing process
[ok] process exit event received

so the cn module requisite has been satisfied.

config:

 God.watch do |w|
    w.uid = 'xman'
    w.gid = 'xman'
    w.log = "/home/xman/code/god.log"
    w.dir = "/home/xman/code
    w.name = "jruby-test"
    w.interval = 180.seconds # default
    w.start = "/usr/local/ruby/bin/ruby /home/xman/code/test.rb"
    w.restart = "#{w.start}"
    w.start_grace = 120.seconds
    w.restart_grace = 120.seconds

    w.behavior(:clean_pid_file)

    w.start_if do |start|
      start.condition(:process_running) do |c|
        c.interval = 5.seconds
        c.running = false
      end
    end

    w.restart_if do |restart|
      restart.condition(:file_time) do |c|
        c.above = 180.seconds
      end
    end

    # lifecycle
    w.lifecycle do |on|
      on.condition(:flapping) do |c|
        c.to_state = [:start, :restart]
        c.times = 5
        c.within = 5.minute
        c.transition = :unmonitored
        c.retry_in = 3.minutes
        c.retry_times = 5
        c.retry_within = 2.hours
      end
    end
  end


-- 
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en.

Reply via email to