The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Rotating some log files - best practice

Discussion in 'General Discussion' started by verdon, Aug 27, 2007.

  1. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Hi,

    I've recently been trying to track down large files on my server and have come across a few log files that are not getting rotated, and I'm curious about other thoughts on best practice to deal with these.

    1) /usr/local/apache/domlogs/www.customer.com-ssl_data_log
    I'm not sure why this isn't being rotated like the other domlogs and am not sure what to do. I'm not sure where domlog rotation is controlled.


    2) /var/log/secure.myserver.com
    This is SSLLogFile for a shared ssl I offer my clients. I'm not really sure why it's there. I suppose it doesn't matter. Should I just create a file for this in /etc/logrotate.d? I sort of understand those files. Anything special I should be aware of?


    3) /var/spool/mqueue/.razor/razor-agent.log
    I suppose I should also add this to /etc/logrotate.d. I could just purge it now and then, but then I'd have to remember to do it.

    Any tips?
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    No advice? Was my question improper, too basic or too off topic?
     
  3. kev1nk

    kev1nk Member

    Joined:
    Sep 11, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Re:logs

    Hello,

    As you already know the cPanel creates statistics for your customers(webalized,awstats....). The data required for the statistics creation is taken from your Apache log files. The logs are not rotated - their data is used and they are being deleted after that.
    If you have applications like razor/pyzor... then you have to create your own logrotate script in order to be able to rotate their logs. The reason - the cPanel just does not know about them, they are not a part of its default installation , so it is unable to manage them.
    Regarding the "*secure*" file in your "/var/log/" folder - it is created by other external application and "logrotate" entry is the best option in this case.


    Best Regards
    Kevin
     
  4. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Thanks Kevin
     
Loading...

Share This Page