Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    529

    Strange problem with the logs

    All of my logs are rotating, but everything is still reporting to the old log file. Anyone know what might be wrong? The old log files are starting to get big. I want to get this fixed before they grow to big.
    The Mc Nation: Your Complete Minecraft Resource Guide!
    Now Featuring Xenforo 2!

  2. #2
    Join Date
    Jun 2004
    Posts
    506
    Im not quite sure what your saying...

    say it is logging to 1.log

    this log is rotated daily so at the end of the day its renamed to 1_1.log

    ie:

    1.log | first Day
    1.log | 1_1.log | Second Day
    1.log | 1_1.log | 1_2.log | Third Day

    1.log on the first day would be the same as 1_2.log on the third day if the rotation was working correctly right? But this isnt working correctly how? Is it logging to 1.log on the first day 1_1.log on the second?

    Please expand

    Cheers.

  3. #3
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    529
    What I mean is when it rotates a file it still logs to the old file.

    mail <---should be logging here (this file is 0mb)
    mail.1
    mail.2
    mail.3 <---but is still logging here (This file is 10mb and growing)
    mail.4


    any logging to mail is logged to mail.3, the server is not using mail like it should. I have no idea why the server is doing this.
    The Mc Nation: Your Complete Minecraft Resource Guide!
    Now Featuring Xenforo 2!

  4. #4
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,979
    Wha logger does your MTA use, syslog? Can you post the logrotate conf file for your maillog?
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  5. #5
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    529
    I think this is what your looking for.


    Log file paths /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron
    Rotation schedule
    Maximum size before rotating Default (Never)
    Number of old logs to keep Default (4)
    Compress old log files? Yes No Default (No)
    Delay compression till next cycle? Yes No Default (No)
    Truncate log file in place? Yes No Default (No)
    Rotate even if log file is empty? Yes No Default (Yes)
    Ignore log file if missing? Yes No Default (No)
    Re-create log file after rotation? Yes, with mode and owned by user and group
    No, don't re-create
    Default (Yes, with old permissions)
    Store old rotated logs in Directory
    Same directory as log file
    Default (Same directory as log file)
    Extension for rotated filenames Default
    Email log file before deleting? Yes, to address
    No, don't email
    Default (No, don't email)
    Log file to email Newest that was just rotated
    Oldest that is about to be deleted
    Default (Oldest that is about to be deleted)
    Commands to run before rotation
    Commands to run after rotation /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    Only run scripts once for all files? Yes No Default (No)
    The Mc Nation: Your Complete Minecraft Resource Guide!
    Now Featuring Xenforo 2!

  6. #6
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,979
    Sorry, you didn't answer the first question, and that doesn't look like a configuration file, but rather the output from the interface of some configuration program.

    However, if your MTA uses syslog, and logrotate is actually configured as above, you should be good to go. Try running:

    logrotate -d
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

Posting Permissions

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