|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
What do you use for monitoring programs?
Dear Forum,
What do you use when it comes to creating a reliable program? By "reliable program" I meant that the program will persist, if it crashes something will pick that crashed service up and make it conduct business again. And also when something bad happens to the program that monitoring tool is responsible to watch, the monitoring tool sends an alert via email, for example. So far, I've seen supervisord and monit but I do not know about their full capabilities. Could you please mention about which one of them or any other monitoring tool you are using? |
|
|||
Needs to be said
If the program crashes, is probably crashed for a reason. So I guess all one needs to do is look for core files. The only programs I had crashed were the ones I wrote. After the crash I did a back-trace via lldb(1) on the core file and found out I had a memory leak. Once fixed no more crashes. If I understand what I have read about OpenBSD, the kernel has a lot of internal checks that will kill a program that tries to go were it is not suppose to. FWIW, the broken programs I fixed on OpenBSD had no issues slowly eating memory on Linux forever. Is there something specific ?
__________________
[t]csh(1) - "An elegant shell, for a more... civilized age." - Paraphrasing Star Wars (tvtropes.org) Last edited by jmccue; 3 Weeks Ago at 03:06 PM. Reason: grammer |
|
|||
Dear John,
Thanks for the input. I think my case is different than what you have described. Specifically, let's say I write a business-critical Python script and it must be daemonized. So if the script produces an error it can retry the task that has given to it, by script's internal mechanisms. But somehow if the script crashes and stops working, this has to be taken care of by the monitoring tool. That's what I need. Best regards |
|
|||
Quote:
Maybe execute it in a script and the script can catch the crash using "trap", or the script checks the return code for non-zero. If it fails, send an email. Using trap and/or the return code you could also resubmit the script. FWIW, I do not use any monitoring tools except for emails sent out from cron.
__________________
[t]csh(1) - "An elegant shell, for a more... civilized age." - Paraphrasing Star Wars (tvtropes.org) |
|
|||
I have used https://cr.yp.to/daemontools/supervise.html for monitoring and restarting. But that was a long time ago. I do not think Bernstein's programs compile on OpenBSD anymore.
Jonathan de Boyne Pollard has made updated versions of Bernstein's program. I think these are in the ports tree of OpenBSD.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thank you for the experience sharing and suggestions.
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installation programs | J65nko | NetBSD Installation and Upgrading | 5 | 23rd February 2024 04:57 AM |
Linux programs on amd64 | nwp | OpenBSD General | 3 | 8th April 2012 06:06 PM |
problem passing /dev/fd/n to programs | TerryP | Programming | 2 | 15th April 2009 08:24 AM |
Distributed Computing Programs | JMJ_coder | General software and network | 0 | 25th November 2008 08:50 PM |
Programs | syrushcw | FreeBSD Security | 1 | 2nd May 2008 05:44 PM |