LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-10-2013, 05:29 PM   #1
andy_o
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
Log file configuration


Hi,

I have just newly installed Slackware, decided I wanted to learn a bit about how linux works, rather than just dumbly use it, and figured this would be a good distro to try that.

Anyway, my question is, after a default Slackware installation are there any config settings I should make to prevent log files from eating up my hard drive? For example, do I need to specify anywhere "don't let logs get bigger than x" or is this automatically taken care of somewhere? Or should I not worry?

Thanks for any help.
 
Old 03-10-2013, 05:52 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Hi,

don't care about the logfiles, it is configured very well on a stock Slackware-installation.

Markus
 
Old 03-11-2013, 04:15 AM   #3
andy_o
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks markush, nice to know that I don't need to worry about it.
 
Old 03-11-2013, 04:30 AM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
I know of only 2 situations where the logs files get out of control.

1. Hardware faults that get logged continuously (fix the hardware)
2. Copying firewall scripts that log everything (The Internet is a nasty place logging all of that is a waste of time on your home computer)
 
Old 03-11-2013, 05:12 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
There are some jobs in root's cron entry that run overnight, one of which (logrotate in cron.daily) manages log files. If you don't leave your machine on, then you might want to change those times so that they will run at a time when you system is actually running.
 
Old 03-11-2013, 05:19 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Quote:
Originally Posted by GazL View Post
There are some jobs in root's cron entry that run overnight, one of which (logrotate in cron.daily) manages log files. If you don't leave your machine on, then you might want to change those times so that they will run at a time when you system is actually running.
For these jobs one can use anacron which is available at slackbuilds.org http://slackbuilds.org/repository/14.0/system/anacron/

Markus
 
Old 03-11-2013, 05:38 AM   #7
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
...if you can be bothered to install an additional cron daemon. I find it easier to just change the time, but you're right. anacron might suit some people better.

Last edited by GazL; 03-11-2013 at 05:40 AM.
 
Old 03-11-2013, 08:36 AM   #8
qweasd
Member
 
Registered: May 2010
Posts: 432

Rep: Reputation: Disabled
If you ever make your own logs, rotating them is easy. One way is to use logrotate. For example, I have daily mirror logs dumped in /var/log/mirrorme.log and /var/log/mirrorme-error.log, so I make a new file in /etc/logrotate.d/, call it whatever, and put something like this in it:
Code:
/var/log/mirrorme.log {
  rotate 0
  ifempty
  daily
  mail melikamp
}

/var/log/mirrorme-error.log {
  rotate 0
  notifempty
  daily
  mail melikamp
}
logrotate is run daily from /etc/cron.daily, so this setup mails me the log and zeroes it daily. You can see man logrotate and whatever you have in /etc/logrotate.d/ for more examples.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to fix "Please have a look at the log file for details: /var/log/jockey.log" harisuciha Linux - Hardware 3 04-29-2012 12:59 PM
[SOLVED] Process a log file on an hourly basis but the log only rotates once a day hattori.hanzo Programming 4 10-28-2010 08:55 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
setting file permissions for file /var/log/Xorg.0.log mfb Linux - Security 1 07-07-2009 01:41 PM
any ideas to reduce log file size or make log file size managed? George2 Programming 2 08-13-2006 06:55 AM


All times are GMT -5. The time now is 12:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration