Yate Study--./yate/packingyate.logrotate

Source: Internet
Author: User

The previous article recorded the Yate learning--./yate/tools/log_rotate.sh;

Continue reading and Logging section of the script today./yate/packingyate.logrotate, first look at the script source code.

# Rotate the log and CDR files before each reaches 2GB in SIZE/VAR/LOG/YATE/VAR/LOG/YATE-CDR.TSV {    size=100m< C3/>rotate 5    Missingok    sharedscripts    notifempty    postrotate/bin/kill-hup '/bin/cat/var/run/ Yate.pid '    Endscript}
This is a log tool logrotate a script, to use the script, the script will be copied to the/etc/logrotate.d/folder inside the script can be used.

This script is roughly meant to be, and it's going to be checked every day.

/var/log/yate and <span style= "font-family: ' Microsoft Yahei '; font-size:10px; " >/VAR/LOG/YATE-CDR.TSV Two log files </span>
<pre name= "code" class= "CPP" >size=100m
If the log file is larger than 100M

<pre name= "code" class= "CPP" >rotate 5
Log file Rollback five times, is full of 100M log files, the date and log name of an old log file, the retention of 5 files, such as: yate-20150423
<pre name= "code" class= "CPP" >missingok
If the directory does not exist, the error will beMissingok for closing an error
<pre name= "code" class= "CPP" >sharedscripts
Represents <span style= "font-family: ' Microsoft Yahei '; font-size:10px; " >postrotate commands are only executed once after the log is compressed </span>
Notifempty
</pre><pre name= "code" class= "CPP" > Postrotate/bin/kill-hup '/bin/cat/var/run/yate.pid '
Command executed after rollback, restart Yate server, before performing log compression

Yate Study--./yate/packingyate.logrotate

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.