Index ソフト・ハード Linuxタスク | logrotate |
logrotate 設定 デフォルト値 |
logrotate ・ログファイルの切替を行う、デフォルトで毎日午前4時2分 ・コマンドの配置:/usr/sbin/ ・設定ファイル「/etc/logrotate.conf」に従って処理 ログファイルの切替の周期 weekly 保存ログファイル数 rotate 4 ログファイル作成 create 設定の読込み include /etc/logrotate.d 配下のファイルはそれぞれのログファイルに対する設定ファイルとして扱われる。・設定ファイルの命令一覧 logrotate設定の命令
/etc/logrotate.confのデフォルト値
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}
|
All Rights Reserved. Copyright (C) ITCL |