Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logrotate

Status
Not open for further replies.

jwant

Technical User
Jul 2, 2001
17
0
0
US
I am looking for a good document or anything that explains logrotate. Can anyone help?
 
Hi,
As already said you can try a man on logrotate.This one is just an example.Here the messages is rotated twice eg. messages.1 , messages.2 like that.Even the size can be specified.

/var/log/messages {
rotate 2
daily
postrotate
killall -HUP syslogd
endscript
}
/var/log/secure {
size=20k
rotate 2
daily
postrotate
killall -HUP syslogd
endscript
}

The other way is to configure the files in the directory /etc/logrotate.d
Here each file holds a specfic daemon logs.But make sure that in the /etc/logrotate.conf this is enabled like this

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

This is it!!
regards
Krischrist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top