Created
October 27, 2009 05:44
-
-
Save eric/219346 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WATCHERS = 10 | |
| # Make sure pid directories exists | |
| FileUtils.mkdir_p '/tmp/profiler-pids' | |
| God.pid_file_directory = '/tmp/profiler-pids' | |
| God::Logger.syslog = false | |
| WATCHERS.times do |i| | |
| God.watch do |w| | |
| w.name = "watched-#{i}" | |
| w.interval = 0 | |
| w.start = "vmstat 10 6" | |
| w.behavior(:clean_pid_file) | |
| w.start_if do |start| | |
| start.condition(:process_running) do |c| | |
| c.interval = 0 | |
| c.running = false | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment