Home

Resources

Products

Developers

Main • LogrotateInYate

Definition

The file “yate.logrotate” is a configuration file that uses the same options and directives as UNIX's logrotate. Just type “man logrotate” in the command line to convince yourself. If you decide that you want to take a look, you can find yate.logrotate in the packing/ subdirectory of Yate. When you install Yate as a service, the configuration file will be installed as /etc/logrotate.d/yate, along with the configuration files for all the other services and programs installed on your system.

Why use logrotate?

Logrotate is an application that runs as a daily cron job. It eases the management of system logs. You can compress, rotate,remove and email file logs of your system as well as for other processes.

How does it work?

Attach:yate_logrotate_design.png Δ

Looking above, you can see the relations between the supervisor, yate's process and an external script, for instance an IVR. Processes use stderr to output diagnostics that are written in yate's log file. /var/log/yate is handled by yate's configuration file, /etc/logrotate.d/yate.

The logrotate configuration file, etc/logrotate.conf, besides the usual options and directives, includes other configuration files found in /etc/logrotate.d. Various packages will install their own configuration file that ensures their logs are properly rotated. This also applies for yate.logrotate, which will rotate yate's log file.

Below you can see the content of the configuration file:

 
Content of /etc/logrotate.d/yate
# Have to rotate the log file before it reaches 2GB in size 

/var/log/yate { 
    size=100M 
    rotate 5 
    missingok 
    notifempty 
    postrotate 
	/bin/kill -HUP `/bin/cat /var/run/yate.pid` 
    endscript 
}

This section describes the lines in /etc/logrotate.d/yate.logrotate and how the file,/var/log/yate, is rotated. yate.logrotate handles the file yate by rotating it each time its' size reaches 100 M. Each day cron will start the logrotate configuration files for each installed program and service. Each day, yate.logrotate will compare the size of /var/log/yate with 100 M. If its' size is 100 M or bigger, the log file will be rotated. The number of rotations is 5. After a running period of time, yate.logrotate will start overwriting the rotated files. This measure is meant to prevent yate's crush due to reaching of /var/log/yate to 2 Gb in size. You won't receive an error message if the log file is missing but the file will not be rotated if it is empty. The command “kill -HUP” sends a SIGHUP signal to Yate's supervisor each time yate.logrotate has finished rotating the log file.

How to use it?

To use yate.logrotate, you must enable the rotate option when you start Yate as a service. The -r option requires enabling the supervised mode and naming a log file. So run Yate including -s -r -l to the command “yate”. When running yate as a service with rotation enabled, you will find the log files in /var/log/yate. Otherwise, the log files are found in the build directory. For more information related to Yate's start command, type yate --help.

3 May 2010:
Yate 3.0.0 alpha 3 released. Featuring the new Jabber server and wideband audio.
Download NOW

8 March 2010:
Yate 2.2 released. Mostly bug fixes. Dahdi compatible. Latest 2 release before 3.0.

6-7 February 2010:
Yate booth at FOSDEM 2010. Free CD with Freesentral available.

2 Nov 2009:
Yate 2.1 launched. Can replace a Cisco PGW2200 to control a Cisco AS54xx.

6 Aug 2008:
Yate and OpenSIPS (former OpenSER) join to build IP based clusters.

4 Aug 2008:
Yate 2 launched.

10 Jul 2008:
Yate presentation in Germany.

Feb 2008:
Yate 2.0.0 alpha 2 released. New routing module allows sending ENUM routed or forked calls to numbers of registered phones. More...

21 Jan 2008:
Yate 2 alpha released. Major changes, new ISDN, SS7 and MGCP stack. Added analogic and RBS support.

3 September:
Yate 1.3 released. Minor fixes and improvments mainly in client and SIP.

14 August:
Yate based ISDN passive recording system released by Trisys.

16 April:
Yate 1.2 released. Added Jingle and XML support, PBX improved.

25 September:
YateAdmin 1 released.

25 September:
Yate 1.1 released. Fallback routing from a database, fax support in Linux and bug fixes. Changelog and Download availables.

11 July 2006:
O'Reilly published an article about prototyping telephony applications with Yate and Python.

10 July 2006:
Yate 1 released. Includes YIAX, YSIP, YRTP and many new features.

June 1st 2006:
New Yate website launched


EditHistoryBacklinksRecent ChangesSearch