LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 09-15-2006, 02:52 PM   #1
TL_CLD
Member
 
Registered: Sep 2006
Posts: 366

Rep: Reputation: 45
Logs - how are they handled


My old Trustix boxes handled all sorts of logging without me doing anything. When I installed a new package, the whole logging thing was taken care of automagically.

It seems to me that this is not the case with Slackware.

How do I go about handling this the best and most "Slack" way?

When I installed SAMBA, /var/log/samba/ was created, and it is starting to fill up with various logfiles. This is all good, but how can I assure that they are a rotated? This is a part of Linux I'm not used to handling.

I believe it has something to do with /etc/logrotate.d/syslog, but I must admit that reading this:

/var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

Only adds to my confusion.

Anybody got a good, newbie-friendly, link to a tutorial/how-to?

Sincerely,
Thomas
 
Old 09-15-2006, 03:09 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I have a file called /etc/logrotate.d/samba that contains the following:
Code:
/var/log/samba/*.log {
   notifempty
   missingok
   sharedscripts
   copytruncate
   postrotate
     /bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid 2> /dev/null` 2> /dev/null || true
   endscript
}
On a low load box like this one I've never had any problems with that setup.
 
Old 09-15-2006, 03:43 PM   #3
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
read man logrotate!
an entry in /etc/logrotate.conf
will surely do what you require

gilead's code may look mystifying, so here is a simple example I knocked up:

#Rotate Xorg log
/var/log/Xorg.0.log {
daily
create 0644 root root
rotate 1
}

tobyl
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupt Associated/handled with ATA/IDE Rangaraju Linux - Hardware 0 05-01-2006 01:39 PM
how are multiple default gateways handled? eantoranz Linux - Networking 9 06-01-2005 02:09 PM
2 INet IP addresses Handled by 1 Firewall scardog Linux - Networking 3 02-15-2004 11:31 AM
How well is FAT32 handled? GAWd Linux - Newbie 3 12-13-2003 05:38 PM
how packets handled at kernel level valib4u Programming 5 09-14-2003 03:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration