in reply to Re: How often should I flush?
in thread How often should I flush?

The point is that I don't want that to happen. I want it to be running 24/7. I'm only home for a few hours, so if it stops sometime else I lose hours of data. I want to prevent that. Is there a way to detect when Perl's just about out of memory?

- p u n k k i d
"Reality is merely an illusion, albeit a very persistent one." -Albert Einstein

Replies are listed 'Best First'.
(jptxs): Re: How often should I flush?
by jptxs (Curate) on Feb 20, 2001 at 08:12 UTC
    If you really are concerned, write a script and use vmstat(see the man page, but *Always* ignore the first line of output from vmstat) to watch the memory use of the program and have it issue some "flush" command to your program if it reaches a certain threshold. That way you can enjoy not having to make the program have to worry about it, but also not need to worry about missing the event if it happens.
    "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche