You can enable log rotation for pgpool logs on postgres clustered VMware Workspace ONE Access installed using VMware Aria Suite Lifecycle.
Problem
The combined disk usage shown with du -hsc /var/log/pgService/pgService* is more than 50 percent of total disk capacity of /dev/sda4 as indicated in the output of the command df -h.
Solution
- When running the command find /etc/logrotate.d -iname pgservicelog, if the response is /etc/logrotate.d/pgservicelog, then run the following commands:
- touch /etc/cron.d/rotatePgserviceLogs
- echo "*/45 * * * * root /usr/sbin/logrotate /etc/logrotate.d/pgservicelog" > /etc/cron.d/rotatePgserviceLogs
- For VMware Workspace ONE Access 3.3.2: /etc/init.d/cron restart
For VMware Workspace ONE Access 3.3.3 or later: systemctl restart crond
- When running the command find /etc/logrotate.d -iname pgservicelog, if there is no response, then run the following commands:
- touch /etc/cron.d/rotatePgserviceLogs
- touch /etc/logrotate.d/pgservicelog
- echo "/var/log/pgService/pgService.log {
copytruncate
rotate 6
compress
missingok
size 50M
}" > /etc/logrotate.d/pgservicelog
- echo "*/45 * * * * root /usr/sbin/logrotate /etc/logrotate.d/pgservicelog" > /etc/cron.d/rotatePgserviceLogs
- For VMware Workspace ONE Access 3.3.2: /etc/init.d/cron restart
For VMware Workspace ONE Access 3.3.3 or later: systemctl restart crond