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.
I tried to remove webalizer but the writelogs.pl processes were still there.
Thank you.
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!
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
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 ;-)
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!
Thanks Joe, I'll update this thread when the number of procs hist 1000 :). So far so good.
Cheers,
Alan
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!