Bug 40852
Summary: | Logcheck errors because new egrep can't handle large pattern files | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Powertools | Reporter: | chris | ||||||||
Component: | logcheck | Assignee: | Tim Powers <timp> | ||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 7.1 | ||||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | i386 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2001-05-18 08:29:48 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
chris
2001-05-16 11:00:54 UTC
Created attachment 18611 [details]
Perl script to act as grep replacement for logcheck
Created attachment 18612 [details]
Trivial patch to make logcheck use grep.pl
I don't want to incorporate this in. It creates a dependancy on perl through a patch that is not a good idea. I am reassigning this and changing the component to grep so that we can fix the actual problem (egrep). Tim I'm not seeing any logcheck problems on my rawhide installation (grep-2.5e-2), assuming it's fixed. Yeah, it does seem to be fixed in grep-2.5e-2. It's *incredibly* slow, though. echo "Hello" | egrep -f /my/patternfile takes 45 seconds on my unloaded system, where /my/patternfile is about 32K in size, as compared with 0.1 seconds for the equivalent using the above grep.pl script. (Might be worth assigning this back to Tim? There's no way I'm going to use egrep in my logcheck script if it's going to take 45 seconds to check every single line of my logs - it'll take all year to finish...) Thanks, Chris. Does pcregrep (from the pcre package) work better for you? Ah, no, forget about that question, pcregrep doesn't handle file input at all. Tim, grep is fixed; assigning this back to you because of the performance issues. It's up to you to apply or WONTFIX this... ;) Hmm. I would be much more comfortable with the patch if it were in python since python is in the base set of dependancies for the distro while perl is not. Is this an option for you? Tim Yep, I take your point completely. I don't speak Python - but I know a man who does... Translation attached, though I'm sure there are cleaner ways of writing the same thing. And it seems to be slightly faster than the Perl version. Thanks again, Chris. Created attachment 18871 [details]
Translation of grep.pl into Python
OK. I have included the pgrep.py python script. logcheck-1.1.1-8 should show up in rawhide once it's updated again. Until then, you can get it from http://people.redhat.com/timp/{RPMS,SRPMS} Tim Great - thanks. Problem is, the patch to use pgrep.py is included, but the corresponding %patch directive is missing from the .spec! Fixed. You can find it in the same place (same release number). Tim Great - thanks. One last thing: I don't think /etc/logcheck/logcheck.conf should be marked %config(noreplace). This has the effect that if someone has altered that file, the new change to use pgrep.py doesn't make its way in, but there's no indication to the user that it should have done. It's fine to mark the other files in /etc/logcheck as %config(noreplace), but logcheck.conf should just be marked %config. Chris. |