113 reputation
3
bio website
location
age
visits member for 11 months
seen 2 days ago

Jun
14
awarded  Student
Jun
13
comment unix logrotate specify chunk size
One more note: logrotate does have option called "copytruncate" which will preserve the original file name, I think what it does is something like that was described in my 3rd comment. If it was not that way there may be serious problems with deleted files and opened file descriptors which may cause the full of file system, correct me if I am wrong. Thanks for all help.
Jun
13
comment unix logrotate specify chunk size
Thank you for reply, can you please clarify how files are moved (my 3rd comment, I have several times edited comments last time, sorry for that). For clarification in your reply "100% correct. After logcheck moves the file," what does logcheck to do with logrotate? It is something completely different AFAIK.
Jun
13
comment unix logrotate specify chunk size
One more question: Does logrotate somehow tracks the changes of the log so it is smart enought to know that if it was no change from last time logs was rotated there is no need to do it again?
Jun
13
comment unix logrotate specify chunk size
One more note: is it safe to move file on which is opened file descroptor? In unix terminology I hope that logrotate did not do "mv syslog syslog.0 && touch syslog" but rather "cat syslog > syslog.0 && echo > syslog", is the reload of rsyslog needed in this case? Thank you
Jun
13
comment unix logrotate specify chunk size
So if I understand right in the post processing part it is necessary to reload rsyslog to enshure that old file descriptor (before rotation) will be closed and new file descriptor (after rotation) will be opened (because of syslog was moved to syslog.1 and syslog was created and thus is in fact new file)? I thought that logrotate has some mechanism to achieve this automatically. PS: Did you mean "syslog.0" not "syslog" in the following senetence: "the rsyslog process is still writing to the old file, syslog.0."? Becuse "old" log is /var/log/syslog not /var/log/syslog.0. Thank you
Jun
7
awarded  Scholar
Jun
7
accepted unix logrotate specify chunk size
Jun
7
comment unix logrotate specify chunk size
I do not understand you well. How can I write postprocessing script which handles the splitting? I need to split files first and then compress them. When logrotate is done it is too late to split files, because they will be splitted by logrotate. Or am I missing something, what is the basic idea of logrotate? It just compress files after they reaches specific size and renames them to {file}.0.log (very basic overview)? I have read several tutorials about logrotate but now I am a little bit confused.
Jun
6
asked unix logrotate specify chunk size
May
23
awarded  Editor