[Mailman-Developers] Log file rollovers

Brad Knowles brad.knowles at skynet.be
Tue Oct 14 20:42:25 EDT 2003


At 5:19 PM -0700 2003/10/14, Nadim Shaikli wrote:

>>  > Well, if the statement "[MM] opens the file on start, and
>>  > doesn't close it" is true, then it sounds very worrying.
>>
>>  Why?
>
>  Because it causes the problem stated earlier in this thread.

	This is the standard way all programs work under Unix -- you open 
the file, you get a filehandle.  With the filehandle open, the file 
can be renamed, moved, or anything else -- the original process will 
continue writing to the filehandle it has open, and those inodes will 
continue to be in use.

	This is a common cause of "missing" space on a filesystem -- when 
you use "du" to show the amount of space currently in use, it doesn't 
match what "df" shows, and the difference is due to filehandles that 
are still being held open but for which there are no known files 
visible from any directory listing that currently references those 
inodes.

>  See answer to above question - logrotate would have no affect on
>  mailman and because I don't want to kill and restart mailman
>  every start of month (or so) to initiate a new group of log files.

	This is the way Unix works.  Get used to it.

>  I can see all your questions are leading to the same point.  I
>  highly recommend you read the problem statement on this thread.

	See above.

>  It seems to me that logrotate (or any other tool) should simply
>  be able to move files for archiving reasons, mailman currently
>  doesn't allow that due to the perceived statement noted above.

	Get to know how the OS works.

	Mailman could only solve this problem by opening the file for 
every single write and then closing it immediately thereafter. 
Believe me, this would kill your performance so much that it simply 
is not practical.

-- 
Brad Knowles, <brad.knowles at skynet.be>

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
     -Benjamin Franklin, Historical Review of Pennsylvania.

GCS/IT d+(-) s:+(++)>: a C++(+++)$ UMBSHI++++$ P+>++ L+ !E-(---) W+++(--) N+
!w--- O- M++ V PS++(+++) PE- Y+(++) PGP>+++ t+(+++) 5++(+++) X++(+++) R+(+++)
tv+(+++) b+(++++) DI+(++++) D+(++) G+(++++) e++>++++ h--- r---(+++)* z(+++)



More information about the Mailman-Developers mailing list