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:#
38
gstreamer0.10-plugins-bad
43
gstreamer0.10-plugins-really-bad
46
libtest-nowarnings-perl
48
libclass-errorhandler-perl
49
zope-ploneerrorreporting
54
^fstab.\+errors=remount
56
WARNING: unexpected IO-APIC
64
RPC call returned error 101
67
mount version older than kernel
69
Warning only 896MB will be used.
70
hostname: Host name lookup failure
71
I can't tell the difference.
72
warning, not much extra random data, consider using the -rand option
74
Warning: 3 database(s) sources
75
were not found, (but were created)
77
The home dir you specified already exists.
78
No Rule for /usr/lib/ispell/default.hash.
79
/usr/sbin/update-fonts-.\+: warning: absolute path
80
hostname: Unknown server error
81
EXT2-fs warning: checktime reached
82
RPC: sendmsg returned error 101
83
can't print them to stdout. Define these classes
87
Can't open dependencies file
88
documents in /usr/doc are no longer supported
89
if you have both a SCSI and an IDE CD-ROM
90
Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
92
Error: only one processor found.
93
Error Recovery Strategy:
94
sector 0 does not have an
95
syslogin_perform_logout: logout() returned an error
96
grub is not in an XFS filesystem.
98
not updating .\+ font directory data.
99
register_serial(): autoconfig failed
100
Fontconfig error: Cannot load default config file
101
asking for cache data failed
102
However, I can not read the target:
103
fai-kernels/modules.dep: No such file
104
Warning: The partition table looks like it was made
107
warning: /usr/lib/X11/fonts
108
can't read /etc/udev/rules.d/z25_persistent-net.rules
109
/cow': No such file or directory
111
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
112
# Here you can define your own patterns. Put one pattern in a line,
113
# do not create empty lines.
114
myerrorpatterns="XXXXX"
115
myignorepatterns="XXXXX"
116
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
118
errorpatterns="$globalerrorpatterns
120
ignorepatterns="$globalignorepatterns
124
if [ -s $errfile ]; then
125
echo "Errorfile already exists. Aborting."
129
grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
131
if [ -s $errfile ]; then
132
echo "ERRORS found in log files. See $errfile."
134
echo "Congratulations! No errors found in log files."