HowTo:Auto-Rollover Via CRON

From XastirWiki
Jump to: navigation, search

NOTE: Most if not all of the log files for Xastir now auto-rollover at a certain filesize, keeping several older versions of each before they get deleted. The information on this Wiki page should still be applicable to other log files on your Linux system however.

Crond daemon must be running on your system.

Here are detailed instructions for SuSE systems for auto-rollover of log files:

Edit /etc/logfiles to add the four logfiles for each user:

#xastir
/home/archer/.xastir/logs/net.log       +1024k  644     archer.users
/home/archer/.xastir/logs/tnc.log       +1024k  644     archer.users
/home/archer/.xastir/logs/wx.log        +1024k  644     archer.users
/home/archer/.xastir/logs/igate.log     +1024k  644     archer.users
/home/hacker/.xastir/logs/net.log       +1024k  644     hacker.users
/home/hacker/.xastir/logs/tnc.log       +1024k  644     hacker.users
/home/hacker/.xastir/logs/wx.log        +1024k  644     hacker.users
/home/hacker/.xastir/logs/igate.log     +1024k  644     hacker.users

Edit /etc/rc.config, change MAX_DAYS_FOR_LOG_FILES to something reasonable and uncomment the line. I set mine for 5 days. Note that this limit will affect ALL logfiles listed in /etc/logfiles:

#MAX_DAYS_FOR_LOG_FILES=365
MAX_DAYS_FOR_LOG_FILES=5
Navigation
Related Advertisements
Personal tools