![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Long running Perl Tk processesby thundergnat (Deacon) |
on May 30, 2008 at 15:50 UTC ( [id://689262]=note: print w/replies, xml ) | Need Help?? |
I have a Perl::Tk based script that does state mandated process monitoring and data collection for some industrial processes in the manufacturing plant where I work. (Serial interface to some National Instrument FieldPoint IO.) We need to do continuous monitoring with some fairly substantial fines if we exceed a threshold of downtime so I was concerned about this myself. I ended up setting up the script to re exec itself once a day to avoid any side effects of memory leaks. You lose a second or two while it restarts but memory leaks can't get big enough to cause problems. Here are the relevant bits. (Note: this is chopped out of a much larger script so some variables are artificially localized and/or not used in this fragment.)
I'm not saying this is the only or best solution, but it works for me. The script this was taken from has been running "continuously" for the past several years.
In Section
Seekers of Perl Wisdom
|
|