Hello all,
In the process of working on/solving another issue, I was shocked to see the size of several of my log files. I checked from the DA log viewer and confirmed log sizes by using a console command, and indeed they are extrodinarily large.
What stuck out to me is the size of the logs vs how much traffic the server is getting. The server is a small single webhosting server that is no where near overloaded or swamped with customers or traffic. This made me wonder if some of these logs like my 1.34 GB exim log aren't getting erased after say a week period.
Here are my logs:
/var/log/cron - 124.4 MB
/var/log/directadmin/error.log - 50.8 KB
/var/log/directadmin/errortasq.log - 1.59 MB
/var/log/directadmin/security.log - 42.0 KB
/var/log/directadmin/system.log - 484 KB
/var/log/exim/mainlog - 107.1 MB
/var/log/exim/paniclog - 148 KB
/var/log/exim/rejectlog - 11.2 MB
/var/log/httpd/access_log - 140 KB
/var/log/httpd/error_log - 5.61 MB
/var/log/httpd/suexec_log - 147 KB
* /var/log/maillog - 1.34 GB
* /var/log/messages - 343.5 MB
* /var/log/proftpd/access.log - 9.88 MB
/var/log/proftpd/auth.log - 0.935 MB
I also went back through and checked my cronjobs on the server and there does not appear to be anything there that is setup to clean out logs after a predetermined amount of time.
What would I need to create in the cronjob area to ensure that these larger logs get cleaned out? The only cronjobs that are running are the following:
/etc/cron.daily/yum.cron
/etc/cron.daily/rpm
/etc/cron.daily/slocate.cron
/etc/cron.daily/logrotate
/etc/cron.daily/makewhatis.cron
/etc/cron.daily/00-logwatch
/etc/cron.daily/tmpwatch
/etc/cron.daily/prelink
/etc/cron.weekly/makewhatis.cron
/usr/local/bin/php -c /usr/local/directadmin/plugins/jtbox/shared/php.ini /usr/l ...
/usr/local/directadmin/dataskq
echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue
/usr/bin/mrtg /etc/mrtg/mrtg.cfg
/usr/local/sysbk/sysbk -q
/etc/webmin/time/sync.pl
In the process of working on/solving another issue, I was shocked to see the size of several of my log files. I checked from the DA log viewer and confirmed log sizes by using a console command, and indeed they are extrodinarily large.
What stuck out to me is the size of the logs vs how much traffic the server is getting. The server is a small single webhosting server that is no where near overloaded or swamped with customers or traffic. This made me wonder if some of these logs like my 1.34 GB exim log aren't getting erased after say a week period.
Here are my logs:
/var/log/cron - 124.4 MB
/var/log/directadmin/error.log - 50.8 KB
/var/log/directadmin/errortasq.log - 1.59 MB
/var/log/directadmin/security.log - 42.0 KB
/var/log/directadmin/system.log - 484 KB
/var/log/exim/mainlog - 107.1 MB
/var/log/exim/paniclog - 148 KB
/var/log/exim/rejectlog - 11.2 MB
/var/log/httpd/access_log - 140 KB
/var/log/httpd/error_log - 5.61 MB
/var/log/httpd/suexec_log - 147 KB
* /var/log/maillog - 1.34 GB
* /var/log/messages - 343.5 MB
* /var/log/proftpd/access.log - 9.88 MB
/var/log/proftpd/auth.log - 0.935 MB
I also went back through and checked my cronjobs on the server and there does not appear to be anything there that is setup to clean out logs after a predetermined amount of time.
What would I need to create in the cronjob area to ensure that these larger logs get cleaned out? The only cronjobs that are running are the following:
/etc/cron.daily/yum.cron
/etc/cron.daily/rpm
/etc/cron.daily/slocate.cron
/etc/cron.daily/logrotate
/etc/cron.daily/makewhatis.cron
/etc/cron.daily/00-logwatch
/etc/cron.daily/tmpwatch
/etc/cron.daily/prelink
/etc/cron.weekly/makewhatis.cron
/usr/local/bin/php -c /usr/local/directadmin/plugins/jtbox/shared/php.ini /usr/l ...
/usr/local/directadmin/dataskq
echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue
/usr/bin/mrtg /etc/mrtg/mrtg.cfg
/usr/local/sysbk/sysbk -q
/etc/webmin/time/sync.pl
Last edited: