3 # parse all log files for error messages
4 # print errors and warnings found to error.log
5 # WARNING: This will only work with english error messages!
7 errfile=$LOGDIR/error.log
9 # Define grep patterns. Do not start or end with an empty line!
10 globalerrorpatterns="error
18 is bigger than the limit
24 E: Sorry, broken packages
27 No previous regular expression
29 Device or resource busy
32 No candidate version found
36 globalignorepatterns="[a-z]\+\.log:#
41 ^fstab.\+errors=remount
43 WARNING: unexpected IO-APIC
51 RPC call returned error 101
54 mount version older than kernel
56 Warning only 896MB will be used.
57 hostname: Host name lookup failure
58 I can't tell the difference.
59 warning, not much extra random data, consider using the -rand option
61 Warning: 3 database(s) sources
62 were not found, (but were created)
64 The home dir you specified already exists.
65 No Rule for /usr/lib/ispell/default.hash.
66 /usr/sbin/update-fonts-.\+: warning: absolute path
67 hostname: Unknown server error
68 EXT2-fs warning: checktime reached
69 RPC: sendmsg returned error 101
70 can't print them to stdout. Define these classes
74 Can't open dependencies file
75 documents in /usr/doc are no longer supported
76 if you have both a SCSI and an IDE CD-ROM
77 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
80 Error: only one processor found.
81 Error Recovery Strategy:
82 sector 0 does not have an
83 syslogin_perform_logout: logout() returned an error
84 grub is not in an XFS filesystem.
86 not updating .\+ font directory data.
87 register_serial(): autoconfig failed
88 Fontconfig error: Cannot load default config file
89 asking for cache data failed
90 However, I can not read the target:
91 fai-kernels/modules.dep: No such file
92 Warning: The partition table looks like it was made
95 warning: /usr/lib/X11/fonts
96 gstreamer0.10-plugins-bad
97 can't read /etc/udev/rules.d/z25_persistent-net.rules
98 /cow': No such file or directory
100 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
101 # Here you can define your own patterns. Put one pattern in a line,
102 # do not create empty lines.
103 myerrorpatterns="XXXXX"
104 myignorepatterns="XXXXX"
105 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
107 errorpatterns="$globalerrorpatterns
109 ignorepatterns="$globalignorepatterns
113 if [ -s $errfile ]; then
114 echo "Errorfile already exists. Aborting."
118 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
120 if [ -s $errfile ]; then
121 echo "ERRORS found in log files. See $errfile."
123 echo "Congratulations! No errors found in log files."