Try adding :
w.stop = "kill -9 {{PID}}"
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 30.seconds
c.running = false
end
end
Best regards,
Nuno Valente.
On Mon, Apr 2, 2012 at 2:20 PM, Sheng LUO <[email protected]> wrote:
> hi there,
>
> My ubuntu runs on 1G ram, where chrome always get fronzen or crashed
> because of flash.
> So I want to watch my chrome with god and limit the cpu and memory it
> occupies.
> Normally, I can run a chrome by typing "google-chrome" in terminal, so I
> write following god script:
>
> God.watch do |w|
> w.name = "chrome"
> w.start = "/opt/google/chrome/chrome"
> w.keepalive :cpu_max => 80.percent, :memory_max => 500.megabytes
> end
>
> When I start the script above by "god -c chrome.god -D", it just keep
> opening new chrome.
> Doesn't it automatically figure out there is already a chrome running?
> What can I do to realize monitoring chrome?
>
> --
> You received this message because you are subscribed to the Google Groups
> "god.rb" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/god-rb/-/QzSqOZcU6ZEJ.
> 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.
>
--
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.