witelogs.pl

7 posts / 0 new
Last post
#1 Fri, 11/03/2006 - 05:20
AlanWoodwick

witelogs.pl

Hi all,

I've a funny problem. When setting up a virtual server I add webalizer stats. That's all good but the virtualmin/webmin creates a writelogs.pl file for each virtual host. The picture looks something like this:

root 1460 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116248 root 1461 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116248 root 1462 0.0 0.3 3680 1588 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116248 root 1463 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1464 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1465 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1466 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1467 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1468 0.0 0.3 3680 1584 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116244 root 1469 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1471 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1472 0.0 0.3 3684 1592 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1473 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1474 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1475 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1476 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116242 root 1477 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1478 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1479 0.0 0.2 3680 1440 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1480 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1481 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1482 0.0 0.2 3684 1444 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239 root 1483 0.0 0.3 3684 1588 ? S 12:05 0:00 /usr/bin/perl /root/webmin-1.290/virtual-server/writelogs.pl 116239

Most of the sites hosted on the machine are not active yet but my major concern is the number of writelog processes. They grow up to 400 and I wonder what would happen when it starts processing the logs.

I have two questions and hope you can help since I couldn't find enough info on the Internet about this.

  1. How can I reduce the number of processes to just which cycles through the logs once per day?
  2. Is there any way I can disable writelogs.pl without crippling the virtualmin?

I tried to remove webalizer but the writelogs.pl processes were still there.

Thank you.

Fri, 11/03/2006 - 10:58
Joe
Joe's picture

Hey Alan,

writelogs.pl has nothing to do with Webalizer. It is a simple log-writer daemon that takes over writing logs for Apache--it is a security precaution against users deleting their log directory and causing Apache to fail (it's a DoS thing, rather than data loss or data theft issue).

You can disable it in the Server Templates "Apache Website" section...the option is called "Write logs via program?
(Handles missing log directory)". I don't know that I recommend turning it off, unless your users are trusted and not "curious" enough to delete or move their log files and directory (you'd be surprised by how many users do this sort of thing when "cleaning up" their home directory).

It's a tiny process and most of the space it uses is the shared perl interpreter and libs. It probably isn't going to hurt anything to have a couple hundred of them.

There is no way to reduce the number of these processes, if it is enabled--Apache spawns one for every domain that has a log write daemon configured.

--

Check out the forum guidelines!

Thu, 11/09/2006 - 10:27
AlanWoodwick

Hi Joe,

Thanks for your reply. I've about 600 of them running no problems so far :). Now I remember that I turned it on because users were constantly deleting their logs directories.

Anyway, I was wondering if it would be possible to set Virtualmin to write the logs to another directory say /etc/httpd/domlogs where it would create a separate file for each domain's access log, then I wouldn't need the writelogs feature. I know Cpanel does it this way and if possible how can I convert the existing /home/user/logs directory to the aforementioned.

Thanks for your support.

Regards,

Alan

Fri, 11/10/2006 - 10:34
DanLong

Hi,
I believe Jamie fixed that kindof with the nodelete file in the log directory. Although it assumes the user is smart enough to not delete an empty file that says no delete ;-)

Fri, 11/10/2006 - 15:05 (Reply to #4)
Joe
Joe's picture

Hey Dan,

It's impossible for them to delete the nodelete file. It's owned by root. Or should be anyway.

The only remaining problem is that the directory can be moved by the user...so it probably solves the "dumb user" problem, but not the "malicious user" problem. writelogs.pl solves both, at the cost of a bit of memory.

--

Check out the forum guidelines!

Sun, 11/12/2006 - 08:22
AlanWoodwick

Thanks Joe, I'll update this thread when the number of procs hist 1000 :). So far so good.

Cheers,

Alan

Sun, 11/12/2006 - 11:30 (Reply to #6)
Joe
Joe's picture

Hehehe...You've got a lot of domains! Good to hear about Virtualmin in high volume deployments. Maybe I should start a forum just for users with more than 500 domains on a single server, just for discussing scalability issues. ;-)

--

Check out the forum guidelines!

Topic locked