Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. In reply to Re: Re: Re: Simple Log Rotate Problem
by idsfa
|
|