I would like to decrease the storage usage of syslog
because the free space of the root partition is small.
Storage usage of syslog are shown below.
-rw-r----- 1 syslog adm 42G Aug 31 14:56 syslog
-rw-r----- 1 syslog adm 3.6G Aug 31 11:55 syslog.1
-rw-r----- 1 syslog adm 512M Aug 30 18:24 syslog.2.gz
-rw-r----- 1 syslog adm 34K Aug 28 07:44 syslog.4.gz
-rw-r----- 1 syslog adm 52K Aug 27 08:31 syslog.5.gz
-rw-r----- 1 syslog adm 47K Aug 26 08:47 syslog.6.gz
To decrease the storage usage (under 1000MB) of syslog
, \etc\logrotate.conf
was edited as shown below. However, storage use is large now.
# see "man logrotate" for details
# rotate log files weekly
daily
# use the syslog group by default, since this is the owning group
# of /var/log/syslog.
su root syslog
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
# system-specific logs may be configured here
size 1000M
How can I decrease the storage taken by syslog
?