Results 1 to 3 of 3

Thread: problem with "logrotate"

  1. #1

    problem with "logrotate"

    Hi,
    This is my simple logrotate.conf

    create
    compress
    /var/log/test/temp.log {
    rotate 1
    noolddir
    start 0
    size 1k
    dateext
    }

    i m running it using the command "logrotate -dvf logrotate.conf"

    The problem is that the rotated log was not being logged into the current directory, instead getting deleted.

    Whr am i goin wrong?

    Regards,
    Chowdary.

  2. #2
    Member
    Join Date
    Jan 2007
    Location
    Adelaide, Australia
    Posts
    112

    Post RE: problem with "logrotate"

    For a start you are running logrotate in debug mode, in that mode no changes will be made to the logs or logrotate. Also the -v switch is redundant as -d also implies -v.
    Check out man logrotrate, it has all the switches and commands for that program

    Cheers,
    Mechdave

  3. #3
    HI,
    thanx for the reply.I sorted it out, but still facing some other prob.

    Here's my conf file

    /var/log/test/log.txt {
    size 100
    rotate 100
    olddir /var/log/chow
    nocompress
    }

    I set it up as a cron job running every minute.The problem is that log.txt is being rotated only after the size reaches 1MB irrespective of the size parameter value i m specifying.

    I added the following to my crontab:
    00-59 00-23 01-31 01-12 00-06 /usr/sbin/logrotate -v /etc/logrotate.conf >/dev/null 2>&1

    I m getting the following if i run logrotate -v logrotate.conf:
    ****************
    reading config file /etc/logrotate.conf
    reading config info for "/var/log/test/log.txt"
    olddir is now /var/log/chow

    Handling 1 logs

    rotating pattern: "/var/log/test/log.txt" 1048576 bytes (10 rotations)
    olddir is /var/log/chow, empty log files are rotated, only log files >= 100 bytes are rotated, old logs are removed
    considering log /var/log/test/log.txt
    log does not need rotating
    ****************
    what ever the size i specify,i always see that 1048576.

    Whr am i going wrong?

Similar Threads

  1. "TELNET-SERVER" connection problem...help me to solve
    By ringque in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 03-02-2010, 08:33 PM
  2. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  3. "MicroHat" "SoftRed"
    By Fatal Error in forum General Chat
    Replies: 0
    Last Post: 05-12-2005, 09:03 PM
  4. "groupadd" and "tree" utilities are nowhere??
    By aromes in forum Redhat / Fedora
    Replies: 1
    Last Post: 10-05-2003, 03:50 AM
  5. Xlib:  extension "GLX" missing on display ":0.0".
    By ph34r in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 12-06-2001, 04:52 PM

Bookmarks

Posting Permissions

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