LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Log Purging for /var/log/secure (https://www.linuxquestions.org/questions/linux-newbie-8/log-purging-for-var-log-secure-4175534615/)

neo4891 02-20-2015 09:39 AM

Log Purging for /var/log/secure
 
Hi All,

I know log purging happens for /var/log/secure on daily basis. I am not able to understand what triggers log purging?

I have a linux device for which /var/log/secure is growing, now it has secure.1 secure.2 secure.3 and secure.4 files.

Any input is appreciated.

Habitual 02-20-2015 10:07 AM

man logrotate

See /etc/logrotate.conf and/or contents of /etc/logrotate.d/

neo4891 02-20-2015 10:48 AM

Hi Habitual,

I didnt find any information on .secure file in vi /etc/logrotate.conf and /etc/logrotate.d. I didnt find any information with command "man logrotate".

Habitual 02-20-2015 10:58 AM

http://manpages.ubuntu.com/manpages/...grotate.8.html

neo4891 02-23-2015 07:29 AM

Hi All,

This is what I got from logrotate.conf.
weekly

rotate 4

create

compress

include /etc/logrotate.d

It seems by default, there will be file 5 log files a week.
After one week, it will clear older one.
In my case each log file was 50MB of size. And there are 5 instance of each. like /var/log/secure, secure.1, secure.2, secure.3 and secure.4.

This appears to be an expected behavior. Isnt it?


All times are GMT -5. The time now is 05:13 AM.