[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] RAQ4 slowing down with high processor load.
- Subject: Re: [cobalt-users] RAQ4 slowing down with high processor load.
- From: Lauchlin <lauchlin_list@xxxxxxxxxxxx>
- Date: Tue Feb 3 13:12:02 2004
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On 04/02/2004, at 3:35 AM, Neil James wrote:
parseReport.pl is the script that creates the stats the the admin
interface. If you set the size of virtual website really big (our
home site is 15GB) log rotate won't rotate the logs until they are 10%
of the size of the sites quota. This means that after a few years of
operation you could potential have some really really big logs, which
of course start to be a problem with parseReport.pl. The solution I
fond was to modify the way logrotate and the parseReport.pl work by
first reducing the size that logrotate uses down to 1% or something
similarly small then secondly deleting a few lines in parseReport.pl
that create the internal admin statistics. I can post more details if
you wish but maybe that will head you on the correct track.
Ah - I hadn't noticed before because that domain is not used to host
web pages, but the home
(ns) site was allocated 1000MB of space. Now even though all it has
on it is the default cobalt
index.html page system status shows the usage as 1%. I looked in the
logs directory but the
files are fairly small (20MB max) so where would I find the large
file that's causing the
problems?
More details would be very useful - thanks very much. Email address is
below.
We are arranging for more RAM to be installed which hopefully will
help but I would prefer to
resolve this now and make sure it doesn't happen again.
Ok to fix this you need to modify system files so only do it if you
know you can fix anything that breaks. Remember it is a good idea to
make copies of any files you modify so you can just copy them back in
later if all hell breaks loose.
This hack will totaly kill the statistics in the admin area of the
cobalt...but who cares...they are crap anyway.
The brute force way to stop this is to stop analog (which is called
from split_logs, which is in turn called from the apache stanza of the
logrotate, which is in turn called from CRON) from running as that is
what is taking up all the CPU cycles.
So:
1) ssh in to your box. (you are using ssh right not telnet)
2) su - root (if you aren't already root)
3) cd /usr/local/sbin/
4) cp split_logs split_logs.original (make some kind of backup you
will remember)
5) vim split_logs
6) go to line 124 ( 124 Shift+G will take you there in vim)
7) enter insert mode (i)
8) comment out lines 124 through to 131 with a #
9) hit esc to exit insert mode
10 write :wq to exit vim (don't forget the colon)
Done.
Now to change the size of individual sites logs just check out the
files in /etc/logrotate.d/ . In there you will see a bung of files
for rotateing different logs including those for sites. You may wish
to change your sites max log file size down to something like 10-20Mb
(unless you havea really really busy site where you get thousands of
hits per day..then you probably want to keep bigger logs.)
Anyway..that should fix it.
sorry about the spelling..it's been a long day and it is only 8am.
--
Lauchlin Wilkinson, BComp
Technical Manager
Internet Tasmania Pty. Ltd.