Re: How to Use mergelogs

From: Ulric Eriksson (
Date: Tue Sep 03 2002 - 09:01:41 CEST

On 3 Sep 2002, Erwien Samantha Y wrote:

> hello guys,
> can you help me with mergelogs command?
> i already try , but no result.
> i have balancing my 3 web server using pen. But now i have work with
> webserver statistics.
> my webserver :
> webA ---->
> webB ---->
> webC ---->
> Pen server -----> :80
> ps.all server time are synchronized. (GMT)
> to produce a web logfile that i can use for my web statistics i have to
> use mergelogs rite?
> mergerlogs -p /www/logs/pen.log
> and i got this error
> "Can't open logfile 'access_log.26'

It means that access_log.26 doesn't exist. Before you run mergelogs, you
must get the logs from all web servers. In your example, something like

scp access_log.26
scp access_log.29
scp access_log.32

But I actually recommend that you don't use mergelogs at all. My own
experience is that it is a PITA to rotate and transfer the logs on a bunch
of web servers. That's the reason behind penlog and penlogd, which
sends the logs over the network to a single place where they are
automatically merged. See the manpages for penlog and penlogd, and also
the HOWTO.

Penlog[d] are useful even if other load balancers are being used, which
often ignore the logging problem completely. In fact, they can be used for
standalone web servers in order to get logs into a central place.

Here's the relevant line from httpd.conf here at

CustomLog "|/usr/local/bin/penlog alphabob 10000 siagweb" combined

And here's the command to start penlogd:

/usr/local/bin/penlogd -j /home/ulric/webalizer -u ulric \
        -l /access_log -p / 10000


This archive was generated by hypermail 2.1.2 : Tue Sep 03 2002 - 09:02:06 CEST