[Logcheck-devel] [patch] performance sucks bricks from my wall
maximilian attems
debian at sternwelten.at
Wed Sep 21 21:11:08 UTC 2005
salut,
On Wed, 21 Sep 2005, Jasper Spaans wrote:
> Today, my kernel went berserk and spewed out about 1 gig of debugging logs.
>
> Baaaad kernel.
urrgs, debian kernel?
> However, logcheck is equally bad as it has been grinding over this gigabyte
> for the last hour and a half, and isn't showing any signs of getting ready
> yet. And is causing my machine to not be as responsive as it should be.
>
> This inspired me to write following patchlet to speed up the process
> somewhat. Concept-code, completely untested, and of course, doesn't compile.
> Might eat your mouse. (This patch is against the version in unstable)
>
> Please let yourselves be inspired by this!
ok thanks for your input,
hadn't enough sleep right now to check the benefits from your idea,
but will do next days.
> --- /usr/sbin/logcheck 2005-08-22 21:34:29.000000000 +0200
> +++ logcheck.new 2005-09-21 14:05:53.055041150 +0200
> @@ -316,8 +316,10 @@
> debug "Applying Logcheck override files"
> for file in $(ls -1 $ignore/) ; do
> debug "clean logcheck-<package>: $file"
> - cleanchecked "$ignore/$file"
> - done
> + cat "$ignore/$file" >>ignores
> + done
> + cleanchecked ignores
> +# rm -f raises
> else
> debug "No Logcheck override files"
> fi
> @@ -326,8 +328,10 @@
> # Remove any entries already reported
> for file in $(ls $raise/ | grep -v '^logcheck') ; do
> debug "Cleaning logcheck: $file"
> - cleanchecked "$raise/$file"
> + cat "$raise/$file" >> raises
> done
> + cleanchecked raises
> +# rm -f raises
> fi
>
> if [ -n "$ignorehigher" ]; then
> @@ -344,8 +348,10 @@
>
> # Now apply any local-* files
> for file in $(ls -1 $ignore/ | grep '^local-') ; do
> - cleanchecked "$ignore/$file"
> + cat "$ignore/$file" >>local-ignores
> done
> + cleanchecked local-ignores
> +# rm local-ignores
> fi
>
> if [ "$(basename $grepfile)" = "logcheck" ]; then
>
>
> Ciao!
>
> Jasper (who really does like logcheck, but is annoyed by performance issues
> like these)
sure that worst case scenario seems not checked yet.
--
maks
More information about the Logcheck-devel
mailing list