Vlogsplitter helps keeping Apache file handle count low
Posted December 8th, 2008 by Jan DittbernerFour months ago I developed a nice little Python script to have a replacement for split-logfile and rotatelogs that fits better to the external logrotate approach of my web server. The resulting vlogsplitter is available at http://www.dittberner.info/projects/servertools/wiki/vlogsplitter.
The following snippet in Apache's configuration activates vlogsplitter:
CustomLog "| /usr/local/sbin/vlogsplitter /var/log/apache2 access.log" vhost_combined
Vlogsplitter maintains a pool of file handles and splits by the first field of the piped log stream. The vhost_combined custom log format defined by Debian's Apache package configuration fits this requirement.
Technorati Tags: