apunkabollywood
asked on
log retention in aix , linux
Hi ,
I need to ensure that log is retained for 400 days in linux and aix server . How to implement it
Thanks
I need to ensure that log is retained for 400 days in linux and aix server . How to implement it
Thanks
ASKER
Log related to wtmp , sulog failedlogin activities ,
I want to keep logs for 400 days
in compress format after 400 days
also tell me how to rotate this to another server in the case do not have space on server
I want to keep logs for 400 days
in compress format after 400 days
also tell me how to rotate this to another server in the case do not have space on server
in Linux you have to use logrotate utility
http://www.linuxjournal.com/article/5314
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/logrotate8.html
edit /etc/logrotate.conf which defines what logrotate does and how. Configuration parameters exist in both a global configuration file and one for each subsystem. The global file is (by default) /etc/logrotate.conf while the subsystem specific definitions are in the directory /etc/logrotate.d.
my configuration it looks
[root@linux1 ~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
#daily
# keep 4 weeks worth of backlogs
rotate 4
# rotate 30
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
madunix
http://www.linuxjournal.com/article/5314
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/logrotate8.html
edit /etc/logrotate.conf which defines what logrotate does and how. Configuration parameters exist in both a global configuration file and one for each subsystem. The global file is (by default) /etc/logrotate.conf while the subsystem specific definitions are in the directory /etc/logrotate.d.
my configuration it looks
[root@linux1 ~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
#daily
# keep 4 weeks worth of backlogs
rotate 4
# rotate 30
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
madunix
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
What process logs to it?
Do you want to delete or compress it after 400 days?
Do you want to regularly rotate the file?