On Wed, 20 Nov 2002 12:30, you wrote:
> > You think you have problems;-)
> >
> >
> > 4:47pm up 25 days, 10:29, 5 users, load average: 133.05, 132.89,
> > 133.32 251 processes: 208 sleeping, 43 running, 0 zombie, 0 stopped
> > CPU states: 0.2% user, 99.5% system, 0.0% nice, 0.2% idle
> > Mem: 126624K av, 124580K used, 2044K free, 0K shrd, 768K
> > buff Swap: 0K av, 0K used, 0K free
> > 224K cached
>
> Whoa.
>
> Dude.
>
> First, add some swap to that poor thing if you can't get it more actual
> memory. You'll notice that it's thrashing itself to death--99.5% system
> indeed! Second, what are you *doing* ?
Runaway logwatch. I fiddled with (and broke) the Apache rotation. I had three
of them running, each demanding 32 Mbytes.
Ordinarily it's more like this:
12:03pm up 26 days, 5:45, 4 users, load average: 0.00, 0.00, 0.00
50 processes: 47 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 0.9% user, 0.4% system, 0.0% nice, 0.0% idle
Mem: 126624K av, 118692K used, 7932K free, 0K shrd, 20636K buff
Swap: 0K av, 0K used, 0K free 26144K
cached
Ordinarily it doesn't need swap or more memory, it's been running like that
for around six months.
Basically, it's a server/firewall for my test lab which, I've realised, is
better-secured than my office machines. It's actually literally a clone of
the office server (or rather, more precisely my office server is a clone of
that machine).
I hope I livened your day. My prevous busiest machine was a 486 running
loadaverage around 14, and I thought that was pretty bad when it was around
80, and then I got that reading. The truth must be terrible. It took hours
for top to start!
I just realised, this is vaguely on-topic for the thread - logrotate is one of
the jobs from the daily crontab.
Actually, the logrotate entry _may_ be of interest. I run several virtual
hosts (mostly for internal use) and wanted to rotate all the logs.
[summer@magpie summer]$ cat /etc/logrotate.d/apache
#/var/log/httpd/access_log /var/log/httpd/agent_log /var/log/httpd/error_log
/var/log/httpd/referer_log {
/var/log/httpd/*g {
missingok
rotate 5
size 800k
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null ||
true
endscript
}
[summer@magpie summer]$
The mistake was the missing letter g in the line
/var/log/httpd/*g {
and its lack caused logrotate to do endless renames.
When reading. beware the line-wraps.
--
Cheers
John Summerfield
Microsoft's most solid OS: http://www.geocities.com/rcwoolley/
Join the "Linux Support by Small Businesses" list at
http://mail.computerdatasafe.com.au/mailman/listinfo/lssb