/var/log/hspc/*.log files are not rotated. There is not enough diskspace inside the OBAS Container.
Use the following steps to resolve the logrotation issue:
Ensure that there is enough diskspace to rotate
/var/log/hspc/*.logfiles; the total free diskspace size should be greater than the combined size of every
~# ls -1Ssh /var/log/hspc/*.log ~# df -h
If there is not enough diskspace, refer to this article to solve the diskspace shortage issue.
Check if crond service is configured to be running in the current runlevel and is running:
~# /etc/init.d/crond status crond (pid 32193) is running... ~# runlevel N 3 ~# chkconfig --list crond ~# crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
according to the output above crond is running, and enabled for current runlevel (3) If crond service is stopped, use the following command to start crond:
~# chkconfig crond --levels 2345 on ~# /etc/init.d/crond start Starting crond: [ OK ]
Ensure that the logrotate
/etc/logrotate.d/hspccommand is working correctly: logrotate configuration for
/var/log/hspc/*.logfiles is stored in
/etc/logrotate.d/hspcfile; the cron is just executing logrotate
/etc/logrotate.d/hspcto rotate these files, so to reproduce the issue with rotation, it is sufficient to execute the following command:
~# logrotate /etc/logrotate.d/hspc
If the command is executed successfully, logrotate works correctly. If the command fails or hangs, terminate the existing instances of logrotate and execute the following command:
~# mv /var/lib/logrotate.status /var/lib/logrotate.status.old
Then try to perform logrotation again.