Actually, I presume that logrotate compresses the file after it rolls it, so if
this did take a while would it have any adverse effect on the system?
From: Morris, Andi [mailto:[email protected]]
Sent: 20 January 2015 14:41
To: '[email protected]'
Subject: Re: [PacketFence-users] logrotate httpd.portal.catalyst
Thanks Louis,
I'll add that in now. Thanks.
I would like to roll this log by hand though if at all possible as I'm not sure
how long the compression will take as part of logrotate.
I don't have 17GB spare on the server unfortunately.
lsof /usr/local/pf/logs/httpd.portal.catalyst shows me that httpd is using the
file (as expected). So, am I able to rename the current
/usr/local/pf/logs/httpd.portal.catalyst file, create a new one, and restart
the httpd service in order to get apache to use the new file? I would like to
do this with as little downtime to the end users as possible of course.
Cheers,
Andi
From: Louis Munro [mailto:[email protected]]
Sent: 20 January 2015 14:05
To: [email protected]
Subject: Re: [PacketFence-users] logrotate httpd.portal.catalyst
On Jan 20, 2015, at 4:42 , Morris, Andi
<[email protected]<mailto:[email protected]>> wrote:
Is there any issue with adding this to the /etc/logrotate.d/packetfence file so
that it is rotated and compressed?
None at all.
It should be there. If it isn't you ought to add it.
I can only imagine this will take a while to compress this huge file, so if I
create an empty file by hand and move the old one out to do by hand will
PacketFence just continue to use the new empty file?
No. if you do that the processes will keep writing to the old file regardless
of it's name.
Remember that what matters to a process is a file descriptor, not a file name.
So if you do that you should restart any process that has an open file
descriptor to that file (find out with lsof).
Alternatively, if you have a spare 17Gb lying around you could add it to the
log rotation with the copytruncate option.
That will copy the contents of the file and then truncate it, neatly solving
the file descriptor issue.
Regards,
--
Louis Munro
[email protected]<mailto:[email protected]> ::
www.inverse.ca<http://www.inverse.ca>
+1.514.447.4918 x125 :: +1 (866) 353-6153 x125
Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu>) and
PacketFence (www.packetfence.org<http://www.packetfence.org>)
________________________________
[Image removed by sender. Cardiff Metropolitan University - 150 years of
nurturing talent]<http://www.cardiffmet.ac.uk/cardiffmet150>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users