Welcome, Guest
Please Login or Register.
Lost Password?
Re: Re: witelogs.pl (1 viewing)
Post Reply

TOPIC: Re: Re: witelogs.pl

#3029
AlanWoodwick (User)
Posts: 3
graphgraph
witelogs.pl 2006/11/03 05:20  
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.
  The administrator has disabled public write access.
#3030
Joe (Admin)
Posts: 4082
graph
Re: witelogs.pl 2006/11/03 10:58  
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.
  The administrator has disabled public write access.
#3093
AlanWoodwick (User)
Posts: 3
graphgraph
Re: witelogs.pl 2006/11/09 10:27  
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
  The administrator has disabled public write access.
#3102
DanLong (User)
Posts: 431
graphgraph
Re: witelogs.pl 2006/11/10 10:34  
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 ;-)
  The administrator has disabled public write access.
#3104
Joe (Admin)
Posts: 4082
graph
Re: Re: witelogs.pl 2006/11/10 15:05  
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.
  The administrator has disabled public write access.
#3107
AlanWoodwick (User)
Posts: 3
graphgraph
Re: witelogs.pl 2006/11/12 08:22  
Thanks Joe, I'll update this thread when the number of procs hist 1000 :). So far so good.

Cheers,

Alan
  The administrator has disabled public write access.
#3110
Joe (Admin)
Posts: 4082
graph
Re: Re: witelogs.pl 2006/11/12 11:30  
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. ;-)
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.