You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hi guys,
I understand how to monitor long running processes with monit or god,
but I don't understand how to monitor Cron jobs (for memory bloating
notably) since such processes
- always have different PIDs when they start
- are precisely supposed to stop when they are done, then restart when
asked (vs running all the time).
I have been looking on the web for a while, but didn't find any simple
way. Is there a recommended "basic strategy" to monitor Cron jobs?
Thanks!
Pierre
Peter Hickman
unread,
Aug 2, 2010, 9:19:04 AM8/2/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
When the process starts, or when it is started by a wrapper, the process writes it's pid to a file such as /var/run/my_app.pid
As the pid is always written to the same file monit can read the file and find the pid of the process and check that there is a process with that pid running.
PierreW
unread,
Aug 2, 2010, 3:04:58 PM8/2/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Thanks Peter.
One thing though: my script/runner doesn't seem to write a PID file
(or at least I can't locate it in the "typical" places - it might be a
right issue). Is there a possibility to manually specify a PID file
(either a runner option, or a shell command)? I can't find such
option...