1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

log will not be rotated after statistics calculation....

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by _sarbc, Jan 9, 2013.

  1. _sarbc

    _sarbc New Pleskian

    10
    85%
    Joined:
    Jan 9, 2013
    Messages:
    19
    Likes Received:
    0
    where will i can see output this command /opt/psa/admin/sbin/statistics --calculate-all

    when running her stdout empty

    but my logfile maillog is growing

    proton-m02:/opt/psa/var/log# /opt/psa/admin/sbin/statistics --calculate-all
    proton-m02:/opt/psa/var/log# ls -lah maillog*
    -rw-r----- 1 root adm 7,5G Янв 10 11:45 maillog
    -rw-r--r-- 1 root root 760M Янв 10 10:19 maillog.processed.1.gz
    -rw-r--r-- 1 root root 4,4M Июл 13 06:25 maillog.processed.2.gz
    -rw-r--r-- 1 root root 16M Июл 12 06:50 maillog.processed.3.gz

    log will not be rotated after statistics calculation....

    Any ideas?
     
  2. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Are you running on a Virtuozzo VPS? If so, you may be running into a bug in some of the OS templates that prevented daily cron jobs from running.

    Take a look at http://forum.parallels.com/showthread.php?t=258358

    You can also use the above link to do some trouble-shooting, as it explains the correct permissions for most of the imporant files and it may be that you need to adjust yours to match.
     
  3. _sarbc

    _sarbc New Pleskian

    10
    85%
    Joined:
    Jan 9, 2013
    Messages:
    19
    Likes Received:
    0
    no, I don't run on a Virtuozzo VPS

    I have two identical servers (proton-m02 is basic and proton-m03 is backup)
    on the backup server all work well
    but, as I said before, basic server have problems are not related to daily cron jobs.

    I running command "statistics" and my log files remain the same

    the only difference the file maillog.processed, on basic server him is not:
    proton-m02# ls -lah /opt/psa/var/log/
    итого 8,5G
    drwxr-xr-x 2 root root 4,0K Янв 10 10:19 .
    drwxr-xr-x 13 psaadm psaadm 4,0K Июл 26 16:13 ..
    -rw-r----- 1 root adm 7,7G Янв 14 14:11 maillog
    -rw-r--r-- 1 root root 760M Янв 10 10:19 maillog.processed.1.gz
    -rw-r--r-- 1 root root 4,4M Июл 13 2012 maillog.processed.2.gz
    -rw-r--r-- 1 root root 16M Июл 12 2012 maillog.processed.3.gz

    please help, what is the matter?
     
  4. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    I'm not sure that "statistics --calculate-all" has any effect on the maillog. I thought that was dealt with by the plesk logrotate task?

    In /etc/cron.daily you'll find 50plesk-daily
    This runs the daily maintenance tasks, which includes stats calculation and log rotation and like I say I *think* are separate. I'm sorry if I'm wrong. And I'm now doubting myself -- maybe I *am* wrong.

    Anyway, you can edit 50plesk-daily and add "echo MaintenanceRun" (without the quotes) at the bottom. You'll then get an email (sent to root, I think) each time it runs. If it isn't running then no email and you'll know this is the root cause of the issue.

    If you do get an email and still no stats and no log rotation then the problem will be something else.

    You mention no output after you run "statistics --calculate-all" .. ok. I don't recall whether you are supposed to get an output or not, except in the case of an error. Do you get output on the other server? If you do then I'm definitely wrong and you should ignore what I'm saying - something else is the matter. Unfortunately I can't think what it might be.
     
  5. _sarbc

    _sarbc New Pleskian

    10
    85%
    Joined:
    Jan 9, 2013
    Messages:
    19
    Likes Received:
    0
    Faris Raouf, my file 50plesk-daily contain next:

    # cat /etc/cron.daily/50plesk-daily
    /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1
    /opt/psa/bin/mysqldump.sh >/dev/null 2>&1

    before you write here, I added in 50plesk-daily line: touch /tmp/tst - it is working!
    the problem will be something else

    I also running /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php manually, log file not rotate =(
    also when executing this command did not arise any errors.

    file script.php is an encode and what in this file impossible to see =(
    on other pages this site on similar topics were messages is other expert that the problem linked specifically with the command "statistics --calculate-all", that's the reason I talked about it.

    Most likely that if the file script.php was been decoded - it would be easier to understand the causes of the problem ...
     
  6. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Good debugging!

    I'm afraid I'm out of ideas. I don't know what else to suggest. Sorry :-(
     
  7. _sarbc

    _sarbc New Pleskian

    10
    85%
    Joined:
    Jan 9, 2013
    Messages:
    19
    Likes Received:
    0
    Faris Raouf, thanks so much for your help.

    I think that might, as a temporary solution, add a block the rotated this logfile in /opt/psa/etc/logrotate.conf follows
    /opt/psa/var/log/maillog {
    missingok
    rotate 3
    size 10M
    compress
    nocreate
    }

    how do you think?
     
  8. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    What OS are you using?

    Mine (Centos) contains:

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

    (as well as lots of other things).

    To me this indicates that something else changes maillog to maillog.processed at some point because there's nothing I can find in the /usr/local/psa/etc/logrodate.d or anywhere else that seems to deal with any other maillog-related things.

    I wonder....maybe the statistics calculation looks at the log in order to determine data transfer for email, then renames to maillog.processed to indicate that it has done so. If the stats generation is failing (as it seems to be, yes?) then maillog never gets changed to maillog.processed and so never rotated.

    So I think what you siggest for logrorate.conf would be fine, but will not solve the problem of the stats not apparently running correctly. So maybe the "no output" from the stats when you run manually is therefore an indication of a problem, even if there's no error message.

    Has nobody else had this problem? Surely someone here must have?
     
Loading...