Re: Logwatch problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux