• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Log files... how to keep them from growing too long?  (Read 1516 times)
hungarianhc
Jr. Member
**

Karma: 2
Posts: 85


View Profile
« on: December 19, 2009, 01:40:10 AM »

So I'm completely happy with my Debian NAND installation, but of course, that requires some disk space management... It occured to me that my log files might get a bit large. I figure I'd set up a cron job to clear them out periodically. Does Linux already do this? Is this even something I need to bother with?
Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #1 on: December 19, 2009, 02:23:10 AM »

If you have logrotate installed you should be fine.  If you don't have it, get it.
Logged

davidbb
Newbie
*

Karma: 1
Posts: 4


View Profile
« Reply #2 on: December 19, 2009, 03:27:07 PM »

as cxbiker61 explains, logrotate will periodically compress your log files. since log files are text, they compress well. i run a syslog server off my plug, and the /var/log directory is at 11 megs after being in operation for 2 months. it will probably stay at around this size, since i have configured logrotate to keep a sliding window of 1 week of logs.
Logged

knireis
Jr. Member
**

Karma: 2
Posts: 88


View Profile
« Reply #3 on: December 20, 2009, 01:55:38 AM »

I run Debian and have disabled rsyslog, this reduces the amount of logging drastically.
Logged

pancho
Newbie
*

Karma: 1
Posts: 20


View Profile
« Reply #4 on: February 10, 2010, 09:18:07 AM »

as cxbiker61 explains, logrotate will periodically compress your log files.
And not only compress them; it will remove old ones, too, preventing infinite growth.
Logged

Pages: [1]
Print
Jump to: