Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    237

    logrotate questions / problems (centos/rh, whm)

    I consistantly have logs hit 2gb and my server slow to a crawl. obviously I'd like to fix this. before I was just turning logging off... but obviously that has its disadvantages.

    in /etc/cron.daily/ I have the following

    #!/bin/sh

    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit 0
    in /etc/logrotate.conf I have the following

    # see "man logrotate" for details
    # rotate log files weekly
    daily

    # 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

    # RPM packages drop log rotation information into this directory
    include /etc/logrotate.d

    # no packages own wtmp -- we'll rotate them here
    /var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
    }

    /usr/local/apache/domlogs/site.com {
    daily
    rotate 3
    copytruncate
    compress
    }

    # system-specific logs may be also be configured here.
    (site.com is the name of the log that hits the 2gb barrier)

    it doesn't seem to do anything. the log's still growing. I don't see any evidence of it being rotated. if things were working, where should the old logs be going, exactly?

  2. #2
    Join Date
    May 2006
    Location
    Teh Interweb
    Posts
    314
    What does the output on the command line look like if you run the command directly?

    Code:
    /usr/sbin/logrotate /etc/logrotate.conf

    [[email protected]] ~ $ cat .signature
    cat: .signature: No such file or directory

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •