Booger has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks!
I have a situation where I must debug a long running Perl process that is crashing once a week. I'm using the Perl debugger to accomplish this.
The problem is that the output from the Perl debugger is very large, size-wise, and since the Perl process is long running it is highly desirable that I rotate the log every couple of hours and compress old log files.
My usual methods of cat /dev/null > debug.log and echo > debug.log do not appear to be working properly; I assume this is because the file remains opened & locked by the Perl debugger? Is there another way to do this properly?
I suspect that this may not really be a Perl issue and more of a file-locking thing, however I'm curious to know if anyone has bothered to tackle this sort of thing before. Any suggestions or comments would be greatly appreciated!
Thanks in advance! booger
Update:FWIW, the line I'm using to invoke the Perl debugger looks something like this:
bash$ PERLDB_OPTS="NonStop LineInfo=debug.log frame=4 AutoTrace" perl -d script.pl --daemonResolved! Thank you everyone!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rotating output from the Perl debugger
by tall_man (Parson) on Apr 20, 2005 at 18:58 UTC | |
by Booger (Pilgrim) on Apr 20, 2005 at 19:22 UTC | |
|
Re: Rotating output from the Perl debugger
by tcf03 (Deacon) on Apr 20, 2005 at 16:41 UTC |