Two days ago, tomcat running on the server generated a log file of 12 GB, resulting in insufficient folder space, tomcat is suspended, found online, you can regularly clean all log files. /opt/tomcat/logs/catalina. out is the path where the file is located. use the command pwd to obtain it./opt...
Two days ago, tomcat running on the server generated a log file of 12 GB, resulting in insufficient folder space, tomcat is suspended, found online, you can regularly clean all log files. /opt/tomcat/logs/catalina. out is obtained by running the command pwd in the file path,/opt/tomcat/logs/catalina. out {rotate 14 www.2cto.com daily copytruncate compress reset empty missingok} Where: rotate 7 indicates that the 7-day backup file daily is retained, and copytruncate indicates that the log file is copied first, then, compress is cleared to compress the backup file missingok. if the log file cannot be found, the compress file is not OK. reset empty indicates that if the log file is empty, rotate is not performed. for example: http://service.ap-southeast-1.maxcompute.aliyun-inc.com/home/apache-tomcat-6.0.18/logs/catalina. out {rotate 7 daily copytruncate nocompress restart empty missingok} and then run the command:/usr/sbin/logrotate/etc/logrotate. conf to synchronize the execution by bossshit
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.