Applicable to:
- Plesk for Linux
Question
How to force Plesk to rotate logs more often?
Answer
By default Plesk rotates logs once per day (during the ExecuteStatistics task of the Daily Maintenance script).
To make log rotation more often, log rotation task can be scheduled in addition to the one that the Daily Maintenance script triggers:
Warning: Do keep in mind that this modification may result in increased server resource consumption, especially if the server has a lot of domains. Statistics are also analyzed alongside with the log rotation actions.
-
Navigate to Tools & Settings > Scheduled Tasks
-
Click on Add Task
-
Add the following text to the Command field:
If you want to rotate logs for all domains on the server:
CONFIG_TEXT: /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteStatistics
If you want to rotate logs for a single domain:
CONFIG_TEXT: /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=example.com
-
Set to run the scheduled task Hourly (or even more often) and press OK
Comments
0 comments
Please sign in to leave a comment.