Enable log rotation for pgpool logs on
postgres clustered VMware Workspace ONE Access
VMware Workspace ONE Access
You can enable log rotation for
pgpool
logs on postgres
clustered VMware Workspace ONE Access
installed
using VMware Aria Suite Lifecycle
.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
.- When running the commandfind/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
- ForVMware Workspace ONE Access3.3.2:/etc/init.d/cron restartForVMware Workspace ONE Access3.3.3 or later:systemctl restart crond
- When running the commandfind/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 {copytruncaterotate 6compressmissingoksize 50M}" > /etc/logrotate.d/pgservicelog
- echo "*/45 * * * * root /usr/sbin/logrotate /etc/logrotate.d/pgservicelog" > /etc/cron.d/rotatePgserviceLogs
- ForVMware Workspace ONE Access3.3.2:/etc/init.d/cron restartForVMware Workspace ONE Access3.3.3 or later:systemctl restart crond