To clear sesstions from /tmp
===========================
tmpwatch -auv 1 /tmp
==========================
If exim failed -->df -h -->/var may be full.
If httpd fails-->/scripts/apache_crop_dom
=========================
/var
-------
cd /var/log/
tail -10000 exim_mainlog > exim_mainlog.bkp
tail -10000 exim_mainlog.bkp > exim_mainlog
rm -rf exim_mainlog.bkp
tail -10000 exim_paniclog > exim_paniclog.bkp
tail -10000 exim_paniclog.bkp > exim_paniclog
rm -rf exim_paniclog.bkp
tail -10000 exim_rejectlog > exim_rejectlog.bkp
tail -10000 exim_rejectlog.bkp > exim_rejectlog
rm -rf exim_rejectlog.bkp
tail -10000 maillog > maillog.bkp
tail -10000 maillog.bkp > maillog
rm -rf maillog.bkp
tail -10000 messages > messages.bkp
tail -10000 messages.bkp > messages
rm -rf messages.bkp
==============
Apache
-----------------
cd /usr/local/apache/logs
tail -1000 error_log > error_log.bk
tail -1000 error_log.bk > error_log
rm -rf error_log.bk
tail -1000 audit_log > audit_log.bk
tail -1000 audit_log.bk > audit_log
rm -rf audit_log.bk
tail -1000 suexec_log > suexec_log.bk
tail -1000 suexec_log.bk > suexec_log
rm -rf suexec_log.bk
tail -1000 access_log > access_log.bk
tail -1000 access_log.bk > access_log
rm -rf access_log.bk
================
domlogs
-------
/scripts/cropdom
===========================
tmpwatch -auv 1 /tmp
==========================
If exim failed -->df -h -->/var may be full.
If httpd fails-->/scripts/apache_crop_dom
=========================
/var
-------
cd /var/log/
tail -10000 exim_mainlog > exim_mainlog.bkp
tail -10000 exim_mainlog.bkp > exim_mainlog
rm -rf exim_mainlog.bkp
tail -10000 exim_paniclog > exim_paniclog.bkp
tail -10000 exim_paniclog.bkp > exim_paniclog
rm -rf exim_paniclog.bkp
tail -10000 exim_rejectlog > exim_rejectlog.bkp
tail -10000 exim_rejectlog.bkp > exim_rejectlog
rm -rf exim_rejectlog.bkp
tail -10000 maillog > maillog.bkp
tail -10000 maillog.bkp > maillog
rm -rf maillog.bkp
tail -10000 messages > messages.bkp
tail -10000 messages.bkp > messages
rm -rf messages.bkp
==============
Apache
-----------------
cd /usr/local/apache/logs
tail -1000 error_log > error_log.bk
tail -1000 error_log.bk > error_log
rm -rf error_log.bk
tail -1000 audit_log > audit_log.bk
tail -1000 audit_log.bk > audit_log
rm -rf audit_log.bk
tail -1000 suexec_log > suexec_log.bk
tail -1000 suexec_log.bk > suexec_log
rm -rf suexec_log.bk
tail -1000 access_log > access_log.bk
tail -1000 access_log.bk > access_log
rm -rf access_log.bk
================
domlogs
-------
/scripts/cropdom
No comments:
Post a Comment