Logwatch problem?

Gene Heskett gene.heskett at verizon.net
Tue Apr 21 15:02:06 UTC 2009


On Tuesday 21 April 2009, Garry T. Williams wrote:
>On Tuesday 21 April 2009 09:28:54 Gene Heskett wrote:
>> I noticed my machine was lagging badly, so I took a look with htop,
>> and
>>
>> /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice init
>>
>> is using 99% of a core (4 core machine) and /dev/sda3 is showing
>> about a 15Meg/sec continuous read operation.  This has been going
>> on for at least an hour.
>>
>> What is it doing?
>
>It's scanning a log file for messages from `init'.  I guess you have a
>*very* large log file that it is reading.  (Take a look at the Perl
>script /usr/share/logwatch/scripts/shared/onlyservice .  It's just
>matching on one of several different Perl regular expressions that
>include the string `init'.)
>
>I see that the Perl regular expressions are suboptimal in that the
>quantifier `*' seems to be used in several places where it should be
>`+'.  This consumes more CPU than necessary.
>
>> And why?
>
>Because the logwatch program runs periodically to summarize
>"interesting" log messages.
>
And I lost a hard drive yesterday, but running e2fsck -c -c -y /dev/sdd1, 
starting about 9 am Sunday morning.  The drive ran out of spare  blocks, and 
is now invisible, no response.  And it generated about a 1.7 gigabyte messages 
file with the errors as it was expiring.  A 1 TG Maxtor drive of course.

So that would explain that.

Should that bit of perl be patched as you noted?

>--
>Garry T. Williams --- +1 678 656-4579


-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Where's the man could ease a heart
Like a satin gown?
		-- Dorothy Parker, "The Satin Dress"




More information about the fedora-list mailing list