Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: Simple Log Rotate Problem

by idsfa (Vicar)
on Nov 13, 2003 at 22:38 UTC ( [id://306955]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Simple Log Rotate Problem
in thread Simple Log Rotate Problem

dingdingdingdingdingdingding

The magic word is cygwin, which means that you do have a unix-y environment. shockme's node touches on exactly what is going on. If a process has a filehandle open when you move the old vpnwarn.out, that process will continue writing to the same file, now named vpnwarn.old. If another process comes along and connects to the new vpnwarn.out, then both files will continue to grow. (tested under cygwin)

It gets worse: If the (still in use) vnpwarn.old file is unlinked while the filehandle is still open, it can continue to grow without even showing up when you list the directory. You can chew up a whole hard drive's capacity that way.

You say that perl is creating these files. When logging, try to follow an "open, write, close" cycle as much as possible. This not only flushes your output (in case you forgot to turn off buffering), but avoids the "phantom menace" of unlinked but expanding files.


My parents just came back from a planet where the dominant life form had no
bilateral symmetry, and all I got was this stupid F-Shirt.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://306955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found