1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Strange log rotation...

Discussion in 'Plesk for Linux - 8.x and Older' started by kilgore, Sep 13, 2005.

  1. kilgore

    kilgore Guest

    0
     
    Hi,

    I'm writting python script to use awstast on plesk server. Everything works smoothly but log rotation of plesk is still very strange.

    I've setup log rotation for all my domains like this :

    - log rotation : daily
    - keep 1 backup

    and i've disabled webstat.

    When I manually run statistics from crontab, sometimes it creates .processed file, sometimes .processed.1 file...

    Maybe you can give me an advice on how statistics works ?

    Regards,

    Kilgore
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Check your /etc/psa/logrotate.conf file, I believe this is the one which controls how many .processed log files are kept. Example:

    /usr/local/psa/var/log/maillog.processed {
    missingok
    rotate 3
    size 10M
    compress
    nocreate
    }

    and also check /usr/local/psa/etc/logrotate.conf.in
     
  3. kilgore

    kilgore Guest

    0
     
    Thanks for your advices but all my conf file in logrotate.d are the same and are corresponding to the config in place :

    /home/httpd/vhosts/mydomain.com/statistics/logs/*.processed {
    daily
    nocompress
    missingok
    rotate 1
    }

    but the rotation still give me sometimes .processed and other .processed.1 files...

    Regards,

    Kilgore
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Did you check this additional file?
     
  5. kilgore

    kilgore Guest

    0
     
    I've checked on a plesk 7.5.2 server and the file you speak about didn't exist.

    But while checking on a 7.5.4 server, I find something "new", a variable called "copytruncate" in the conf file for each domain rotation ?
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    The "copytruncate" command tells it to copy the contents to another file without stopping the associated service, then after it has copied the contents, it truncates the original file.

    This is not Plesk specific, I guess they just changed the way they set it up between the older version and the new. It's actually better to use copytruncate anyways since it doesn't have to stop the service which has the file open.
     
Loading...