/[fai]/trunk/examples/simple/hooks/savelog.LAST
ViewVC logotype

Contents of /trunk/examples/simple/hooks/savelog.LAST

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2492 - (show annotations) (download)
Wed Nov 10 10:39:30 2004 UTC (8 years, 6 months ago) by lange
File size: 2676 byte(s)
exclude all harmless messages with string "is harmless",
exclude "grub is not in an XFS"
1 #! /bin/bash
2
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!
6
7 errfile=$LOGDIR/error.log
8
9 # Define grep patterns. Do not start or end with an empty line!
10 globalerrorpatterns="error
11 fail
12 warn
13 bad
14 no space
15 syntax
16 Couldn't stat
17 Cannot access
18 is bigger than the limit
19 did not exist
20 non existent
21 not found
22 couldn't
23 can't
24 E: Sorry, broken packages
25 operator expected
26 ambiguous redirect
27 No previous regular expression
28 No such
29 Device or resource busy
30 unknown option
31 [a-z]\+\.log:E:
32 cannot create"
33
34 globalignorepatterns="[a-z]\+\.log:#
35 libroxen-errormessage
36 liberror-perl
37 libgpg-error0
38 ^fstab.\+errors=remount
39 [RT]X packets:
40 WARNING: unexpected IO-APIC
41 warned about = ( )
42 daemon.warn
43 kern.warn
44 rw,errors=
45 Expect some cache
46 no error
47 failmsg
48 RPC call returned error 101
49 deverror.out
50 (floppy), sector 0
51 mount version older than kernel
52 Can't locate module
53 Warning only 896MB will be used.
54 hostname: Host name lookup failure
55 I can't tell the difference.
56 warning, not much extra random data, consider using the -rand option
57 confC._FILE
58 Warning: 3 database(s) sources
59 were not found, (but were created)
60 removing exim
61 The home dir you specified already exists.
62 No Rule for /usr/lib/ispell/default.hash.
63 /usr/sbin/update-fonts-.\+: warning: absolute path
64 hostname: Unknown server error
65 EXT2-fs warning: checktime reached
66 RPC: sendmsg returned error 101
67 can't print them to stdout. Define these classes
68 warning: downgrading
69 suppress emacs errors
70 echo Error:
71 Can't open dependencies file
72 documents in /usr/doc are no longer supported
73 if you have both a SCSI and an IDE CD-ROM
74 Monitoring disabled
75 kernel-patch-badram
76 Error: only one processor found.
77 Error Recovery Strategy:
78 sector 0 does not have an
79 syslogin_perform_logout: logout() returned an error
80 grub is not in an XFS filesystem.
81 is harmless
82 not updating .\+ font directory data."
83 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
84 # Here you can define your own patterns. Put one pattern in a line,
85 # do not create empty lines.
86 myerrorpatterns="XXXXX"
87 myignorepatterns="XXXXX"
88 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
89 # The main routine
90 errorpatterns="$globalerrorpatterns
91 $myerrorpatterns"
92 ignorepatterns="$globalignorepatterns
93 $myignorepatterns"
94
95 cd $LOGDIR || exit 3
96 if [ -s $errfile ]; then
97 echo "Errorfile already exists. Aborting."
98 exit
99 fi
100
101 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
102
103 if [ -s $errfile ]; then
104 echo "ERRORS found in log files. See $errfile."
105 else
106 echo "Congratulations! No errors found in log files."
107 fi

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5