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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2831 - (show annotations) (download)
Wed Apr 20 13:51:16 2005 UTC (8 years, 1 month ago) by lange
Original Path: trunk/examples/simple/hooks/savelog.LAST
File size: 2810 byte(s)
add error message to global pattern
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 No candidate version found
33 cannot create"
34
35 globalignorepatterns="[a-z]\+\.log:#
36 libroxen-errormessage
37 liberror-perl
38 libgpg-error0
39 ^fstab.\+errors=remount
40 [RT]X packets:
41 WARNING: unexpected IO-APIC
42 warned about = ( )
43 daemon.warn
44 kern.warn
45 rw,errors=
46 Expect some cache
47 no error
48 failmsg
49 RPC call returned error 101
50 deverror.out
51 (floppy), sector 0
52 mount version older than kernel
53 Can't locate module
54 Warning only 896MB will be used.
55 hostname: Host name lookup failure
56 I can't tell the difference.
57 warning, not much extra random data, consider using the -rand option
58 confC._FILE
59 Warning: 3 database(s) sources
60 were not found, (but were created)
61 removing exim
62 The home dir you specified already exists.
63 No Rule for /usr/lib/ispell/default.hash.
64 /usr/sbin/update-fonts-.\+: warning: absolute path
65 hostname: Unknown server error
66 EXT2-fs warning: checktime reached
67 RPC: sendmsg returned error 101
68 can't print them to stdout. Define these classes
69 warning: downgrading
70 suppress emacs errors
71 echo Error:
72 Can't open dependencies file
73 documents in /usr/doc are no longer supported
74 if you have both a SCSI and an IDE CD-ROM
75 Monitoring disabled
76 kernel-patch-badram
77 Error: only one processor found.
78 Error Recovery Strategy:
79 sector 0 does not have an
80 syslogin_perform_logout: logout() returned an error
81 grub is not in an XFS filesystem.
82 is harmless
83 not updating .\+ font directory data.
84 register_serial(): autoconfig failed
85 Fontconfig error: Cannot load default config file
86 cdrom: open failed."
87 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
88 # Here you can define your own patterns. Put one pattern in a line,
89 # do not create empty lines.
90 myerrorpatterns="XXXXX"
91 myignorepatterns="XXXXX"
92 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
93 # The main routine
94 errorpatterns="$globalerrorpatterns
95 $myerrorpatterns"
96 ignorepatterns="$globalignorepatterns
97 $myignorepatterns"
98
99 cd $LOGDIR || exit 3
100 if [ -s $errfile ]; then
101 echo "Errorfile already exists. Aborting."
102 exit
103 fi
104
105 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
106
107 if [ -s $errfile ]; then
108 echo "ERRORS found in log files. See $errfile."
109 else
110 echo "Congratulations! No errors found in log files."
111 fi

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5