Storage and Analysis of logrotate log capacity

Source: Internet
Author: User

Scenario: in the actual application environment, we need to independently mount the log directory to a partition or a virtual memory disk. If you mount/var/log to the memory virtual disk and the file format is tmpfs, You need to calculate it carefully. After all, memory resources are always limited, not to mention embedded operating systems. Therefore, it is best to allocate proper memory space during mounting. The so-called fit should be the maximum capacity generated by logs when the system load is the heaviest. If logs are continuously generated, the entire operating system will be filled. In this case, you should start logroate to store and delete redundant log files. However, this logrotate Log service runs once a day and requires detailed configuration. Here, we suggest porting this log to the hourly plan, which should not work, because the log generated files are named by date. So what we need to test is to generate the maximum log capacity every day, and then calculate the logs that need to be stored for several days.

 

Had better: It is recommended that you store logs hourly. Then, you can view the maximum number of stored logs. The rotate is used to calculate the total size !!

Storage and Analysis of logrotate log capacity

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.