Overview
Comment: | adding triage script |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.64 |
Files: | files | file ages | folders |
SHA1: |
01756c020e50b0c399eef1d15e3f99b8 |
User & Date: | bjbarcla on 2017-03-28 17:07:59 |
Other Links: | branch diff | manifest | tags |
Context
2017-03-28
| ||
18:35 | special handler for strange configdat not defined issue. Updated to retry up to five times. check-in: 9b63886415 user: matt tags: v1.64 | |
17:07 | adding triage script check-in: 01756c020e user: bjbarcla tags: v1.64 | |
14:59 | Fixed several unusual crashes check-in: 51fbce80b9 user: matt tags: v1.64 | |
Changes
Added utils/triage.rb version [37ab272305].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #!/usr/bin/env ruby #dir = "." #if ARGV.length == 1 # dir = ARGV[0] #end #puts dir #exit 1 allfiles = [] server_logs = `find logs/ -type f -name 'server*.log' 2>/dev/null`.split /\n/ allfiles += server_logs ARGV.each{|dir| nbfiles = `find #{dir} -type f -name '##*' 2>/dev/null`.split /\n/ fakefiles = `find #{dir} -type f -name 'NBFAKE-*' 2>/dev/null`.split /\n/ allfiles = allfiles + nbfiles + fakefiles } buckets = Hash.new{|h,k| h[k]=[]} #;buckets['OK'] = [] #;buckets['stackdump'] = [] sig_patterns = [ 'cannot create directory - File exists', 'in thread: \(finalize!\) bad argument type - not a database or statement: #<unspecified>', 'cannot delete file - No such file or directory: .*\/.runconfig.', 'Error: \(hash-table-ref/default\) bad argument type - not a structure of the required type', '\(#<thread: Watchdog thread>\): in thread: \(open-output-file\) cannot open file - File exists:', 'http-transport.scm:442: posix-extras#change-file-times', 'thread: \(file-exists\?\) system error while trying to access file:', 'error: database is locked', 'Finalizing failed, unable to close due to unfinalized statements or unfinished backups', 'rmt.scm:276: current-milliseconds', 'http-transport.scm:366: exit', 'should never happen', 'FATAL: \*configdat\* was inaccessible! This should never happen.', '!!ISOENV PRESENT!!' ] allfiles.each{|logfile| bucket = 'OK' open(logfile){|fh| fh.each{|line| if line.match(/Call history/) if bucket == 'OK' bucket='??' end end sig_patterns.each_with_index{|pat,bucket_name| #bucket_name,pat = i if line.match(/#{pat}/) bucket=bucket_name end } } } buckets[bucket] << logfile } puts "count\tsignature\texample file" buckets.keys.each{|bucket| count = buckets[bucket].length example = buckets[bucket][0] if example puts "#{count}\tsignature-#{bucket}\t#{example}" if bucket.to_s.match(/^[0-9]+$/) puts " `- pattern = /#{sig_patterns[bucket]}/" end else puts "#{count}\tsignature-#{bucket}" end } #puts buckets['stackdump'][0] |