LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 03-06-2006, 01:04 AM   #1
logicalfuzz
Member
 
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Rep: Reputation: 41
Pix logging on syslog... logrotate does not work


Hello,
I have configured PIX to log into Linux syslog on my RHEL4 m/c. The logging works fine, but when i configured logrotate to rotate the log files on a daily basis , it does not seem to work. Actually there are a couple of more problems associated to this as well. (My intension is to rotate the log file everyday at 12:00 noon)

PROBLEM 1.
----------
To enable network based logging i run the syslog daemon with the command 'syslogd -r -m 0'. I did the following changes to reflect the same in /etc/init.d/syslog
Code:
...<snip>...
# Source config
if [ -f /etc/sysconfig/syslog ] ; then
        . /etc/sysconfig/syslog
else
        SYSLOGD_OPTIONS="-r -m 0"
        KLOGD_OPTIONS="-2"
fi

RETVAL=0

umask 077

start() {
        echo -n $"Starting system logger: "
        daemon syslogd $SYSLOGD_OPTIONS
        RETVAL=$?
        echo
        echo -n $"Starting kernel logger: "
        daemon klogd $KLOGD_OPTIONS
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/syslog
        return $RETVAL
}
...</snip>...
But this time 'service syslog start' fails!! (though it starts on manually running the command) Strangely, even when it shows failed, the service does start, as 'ps -ef | grep syslog' shows
Code:
root     25023     1  0 10:44 ?        00:00:00 syslogd -m 0
PROBLEM 2.
----------
Now i read the logrotate manpage and acordingly created the file /etc/logrotate.d/pix_rotate as follows:
Code:
#cat /etc/logrotate.d/pix_rotate
/var/log/pix/SyslogCatchAll.log {
                olddir DatedLogs
        postrotate
                /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
}
Then i put the cron job as follows:
00 12 * * * /usr/sbin/logrotate

Well, this does not seem to work. How do i make it work? (I know i'd be overwriting the rotated log file everyday, but i hope 'extension `date`' in the file /etc/logrotate.d/pix_rotate would help).

Any help on this would be appreciated. i've been struggling with logrotate for quite a while!!!

[edit] I also made the following additions to /etc/logrotate.conf:
Code:
/var/log/pix/SyslogCatchAll.log {
       daily
       create 0664 root root
       rotate 120
}

Last edited by logicalfuzz; 03-06-2006 at 02:27 AM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
syslog-ng & Pix Problems mpapet Debian 1 01-27-2006 04:30 PM
Cisco PIX syslog problems jce23 Linux - Security 5 09-13-2004 05:15 PM
Configuring /etc/syslog for Cisco PIX triley Linux - General 0 07-02-2004 11:28 AM
PIX to linux syslog daemon neoflea Linux - Networking 1 09-10-2003 05:58 PM
Im running syslogd. I also have my PIX firewall logs being written to my linux syslog adamrau Linux - Security 2 12-19-2001 02:38 PM


All times are GMT -5. The time now is 10:55 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration