LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2004, 05:24 AM   #1
pippet
Member
 
Registered: May 2004
Posts: 67

Rep: Reputation: 15
problem with logrotate


Hello!
I want to run a script just before the logratation of dansguardian's access.log file. I put the follwoing file in /etc/logrotate.d/

#dansguardian

/var/log/dansguardian/access.log {
daily
rotate 5
copytruncate
compress
notifempty
missingok
prerotate
/var/log/dansguardian/view_log_minimal
endscript
}

What is the problem with the above scrpt? it is not working. I think logrotate is not reading that file. I just put that file in the directory, is that enough? Or i have to run any command to make logrotate read the file?
 
Old 08-20-2004, 09:37 AM   #2
dthacker
Member
 
Registered: Nov 2003
Location: Omaha, NE
Distribution: Ubuntu, Kubuntu, Ubuntu Server
Posts: 77

Rep: Reputation: 15
Hi Pippet,

man logrotate says...
OPTIONS
-d Turns on debug mode and implies -v. In debug mode, no changes will be made to the logs or to the logrotate
state file.

so log in as root and try
Code:
logrotate -d /etc/logrotate.conf
This will give you an output of everything logrotate will do, without actually touching any files. Examining the output in "less" should allow you to see if your file in logrotate.d is being acted on.

HTH,
dthacker
 
Old 09-07-2004, 01:23 AM   #3
pippet
Member
 
Registered: May 2004
Posts: 67

Original Poster
Rep: Reputation: 15
It worked but i didn't notice.

Sorry I couldn't respond for the last 2 weeks

There wasn't any problem with the conf. file. The problem was in the pre rotate shell script. It was supposed to produce an o/p file. It produced the o/p i require and placed it in / dir since i haven't mentioned the path.
I couldn't it at first.

Thanks alot.
pip
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with logrotate tflavell Linux - Newbie 6 07-04-2005 03:32 AM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 12:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 09:28 AM
logrotate Rig24 Linux - Newbie 2 07-11-2003 05:08 AM
logrotate MrJoshua Linux - General 2 09-25-2002 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:07 AM.

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