[Logcheck-devel] [patch] performance sucks bricks from my wall

Jasper Spaans jasper at vs19.net
Wed Sep 21 12:30:28 UTC 2005


Hiya!

Today, my kernel went berserk and spewed out about 1 gig of debugging logs.

Baaaad 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!

--- /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)
-- 
Jasper Spaans                                       http://jsp.vs19.net/
 14:30:12 up 10444 days,  5:17, 0 users, load average: 4.29 4.67 9.17

               This line was last modified 0 seconds ago.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20050921/f3568ddf/attachment.pgp 


More information about the Logcheck-devel mailing list