LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-20-2005, 02:35 PM   #1
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Logrotate hangs


I have a Slackware 10.0 box that hangs when logrotate runs. I ran it with the script in /etc/cron.daily and when I ran it manually.

Here is the output when I run logrotate -v /etc/logrotate.conf

Code:
root@holmesnet:~# logrotate -v /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file syslog
reading config info for /var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog
reading config info for /var/log/wtmp
I reinstalled the Slackware package and still the same thing. I looked thru the log files and did not see any messages. So you could say that I am stumped. Any help would be appericated.
 
Old 06-21-2005, 06:39 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
What copy options are in those files?
Try again with the copytruncate option in each..
 
Old 06-21-2005, 11:15 AM   #3
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 78
It is running the default for Slackware.

/etc/logrotate.d/syslog
Code:
/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
}
/etc/logrotate.conf
Code:
# /etc/logrotate.conf
#
# logrotate is designed to ease administration of systems that generate large
# numbers of log files.  It allows automatic rotation, compression, removal, and
# mailing of log files.  Each log file may be handled daily, weekly, monthly, or
# when it grows too large.
#
# logrotate is normally run daily from root's crontab.
#
# For more details, see "man logrotate".

# rotate log files weekly:
weekly

# keep 4 weeks worth of backlogs:
rotate 4

# create new (empty) log files after rotating old ones:
create

# uncomment this if you want your log files compressed:
#compress

# some packages install log rotation information in this directory:
include /etc/logrotate.d

# Rotate /var/log/wtmp:
/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
}

# Note that /var/log/lastlog is not rotated.  This is intentional, and it should
# not be.  The lastlog file is a database, and is also a sparse file that takes
# up much less space on the drive than it appears.

# system-specific logs may be also be configured below:

Last edited by tangle; 06-21-2005 at 11:17 AM.
 
Old 06-21-2005, 04:53 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
I suggest changing the "create" option to "copytruncate"

This eliminates any possible conflict if a file is open for writing when logrotate wants to work on it.

The hanging could be a damaged binary file or a write/read conflict.
These kind of possibilities need to be eliminated one by one if there aren't any logfile messages to describe the problem.
 
Old 06-22-2005, 02:34 PM   #5
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 78
I changed the create option and it still hung. Since the PC is not that important , I'll go ahead and re-install. Thanks for the help.
 
  


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
Logrotate negation brentos Linux - Software 1 04-21-2004 12:39 PM
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 - Software

All times are GMT -5. The time now is 04:11 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