74aa116a609d5253924218f4f34133a3d252b52d
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
20 is bigger than the limit
26 E: Sorry, broken packages
29 No previous regular expression
31 Device or resource busy
34 No candidate version found
36 Couldn't find any package whose name or description matched
38 The following packages have unmet dependencies"
40 globalignorepatterns
="[a-z]\+\.log:#
41 Error: Driver 'pcspkr' is already registered, aborting
42 : bytes packets errors dropped
49 Enabling conf localized-error-pages
54 gstreamer0.10-plugins-really-bad
58 libtest-nowarnings-perl
60 libclass-errorhandler-perl
61 zope-ploneerrorreporting
66 ^fstab.\+errors=remount
67 Opts: errors=remount-ro
69 WARNING: unexpected IO-APIC
77 RPC call returned error 101
80 mount version older than kernel
82 Warning only 896MB will be used.
83 hostname: Host name lookup failure
84 I can't tell the difference.
85 warning, not much extra random data, consider using the -rand option
87 Warning: 3 database(s) sources
88 were not found, (but were created)
90 The home dir you specified already exists.
91 No Rule for /usr/lib/ispell/default.hash.
92 /usr/sbin/update-fonts-.\+: warning: absolute path
93 hostname: Unknown server error
94 EXT2-fs warning: checktime reached
95 RPC: sendmsg returned error 101
96 can't print them to stdout. Define these classes
100 Can't open dependencies file
101 documents in /usr/doc are no longer supported
102 if you have both a SCSI and an IDE CD-ROM
103 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
105 Error: only one processor found.
106 Error Recovery Strategy:
107 sector 0 does not have an
108 syslogin_perform_logout: logout() returned an error
109 grub is not in an XFS filesystem.
110 grub-install: line 374:
111 grub-probe: error: Cannot open \`/boot/grub/device.map'
113 not updating .\+ font directory data.
114 register_serial(): autoconfig failed
115 Fontconfig error: Cannot load default config file
116 asking for cache data failed
117 However, I can not read the target:
118 Warning: The partition table looks like it was made
121 warning: /usr/lib/X11/fonts
122 can't read /etc/udev/rules.d/z25_persistent-net.rules
123 /cow': No such file or directory
124 Dummy start-stop-daemon called
125 X: bytes packets errors
129 conflicts with ACPI region
130 cannot stat \`/etc/modprobe.d/\*.conf'
133 process \`kudzu' used the deprecated sysctl system call
134 PM: Resume from disk failed
135 JBD: barrier-based sync failed
136 aufs: module is from the staging directory, the quality is unknown
137 warning: linuxlogo stop runlevel arguments (none) do not match
138 insserv: warning: script .\+ missing LSB tags and overrides
139 live-premount.\+ If this fails
140 cannot read table of mounted file systems
141 error: no alternatives for
142 ERST: Error Record Serialization Table (ERST) support is initialized
143 ERST: Table is not found
144 HEST: Table not found
145 failed to stat /dev/pts
146 Failed to connect to socket /var/run/dbus/system_bus_socket
147 fail to add MMCONFIG information
148 can't initialize iptables table
149 can't initialize ip6tables table
150 Authentication warning overridden
151 update-alternatives: warning: skip creation of
152 update-rc.d: warning: start and stop actions are no longer supported"
154 # add pattern on some conditions
155 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
156 globalignorepatterns
="$globalignorepatterns
157 WARNING: untrusted versions
158 Ignoring these trust violations"
160 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
161 # Here you can define your own patterns. Put one pattern in a line,
162 # do not create empty lines.
163 myerrorpatterns
="X_X-X_XX"
164 myignorepatterns
="X_X-X_XX"
165 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
167 errorpatterns
="$globalerrorpatterns
169 ignorepatterns
="$globalignorepatterns
173 if [ -s $errfile ]; then
174 echo "Errorfile already exists. Aborting." >&2
178 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
179 if [ "$verbose" ]; then
180 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
181 mv $LOGDIR/tempfile
$errfile
184 if [ -s $errfile ]; then
185 echo "ERRORS found in log files. See $errfile" >&2
187 echo "Congratulations! No errors found in log files."