resubmitMissing.sh - resubmit calibration jobns for missing runs
[u/mrichter/AliRoot.git] / TPC / scripts / filterRecLog.sh
CommitLineData
d1513470 1# marian.ivanov@cern.ch
2# Filter error logs
3# Input - errRec.logs - text file with the list of error logs
80af44ba 4# Output - abort.log - text file with the seg.faults runs
5# - abortout.log - text file with the output of the seg.fault runs
6# - the err.log and out.log suppose to be in the same directory
7# -syswatchAbort.log
84ddafc8 8#
9isOK=0
d1513470 10nonOK=0
80af44ba 11#
84ddafc8 12rm abort.log
13rm abortout.log
80af44ba 14rm syswatchAbort.log
15rm syswatchAll.log
05e3ee70 16echo hname/C:sname/C:id0/I:id1/I:id2/I:first/D:stampSec/D:mi.fMemUsed/D:mi.fSwapUsed/D:cI.fUser/D:cI.fSys/D:pI.fMemResident/D:pI.fMemVirtual/D:pI.fCpuUser/D:pI.fCpuSys/D:stampOldSec/D:miOld.fMemUsed/D:miOld.fSwapUsed/D:cIOld.fUser/D:cIOld.fSys/D:pIOld.fMemResident/D:pIOld.fMemVirtual/D:pIOld.fCpuUser/D:pIOld.fCpuSys/D > syswatchAbort.log
17echo hname/C:sname/C:id0/I:id1/I:id2/I:first/D:stampSec/D:mi.fMemUsed/D:mi.fSwapUsed/D:cI.fUser/D:cI.fSys/D:pI.fMemResident/D:pI.fMemVirtual/D:pI.fCpuUser/D:pI.fCpuSys/D:stampOldSec/D:miOld.fMemUsed/D:miOld.fSwapUsed/D:cIOld.fUser/D:cIOld.fSys/D:pIOld.fMemResident/D:pIOld.fMemVirtual/D:pIOld.fCpuUser/D:pIOld.fCpuSys/D > syswatchAll.log
80af44ba 18
80af44ba 19
20#
d1513470 21for efile in `cat errRec.log` ;do
22 xxx=`cat $efile| grep segmentation`
84ddafc8 23 xxx=$xxx`cat $efile| grep Aborted`
05e3ee70 24 xxx=$xxx`cat $efile| grep floating`
25 sysfile=`echo $efile| sed s_err_syswatch_`
80af44ba 26 #
27 if [ -z "$xxx" ]
84ddafc8 28 then
29 let isOK=isOK+1
30 else
31 let nonOK=nonOK+1
32 echo nonOK=$nonOK
33 echo "$efile" >>abort.log
34 echo $efile
35 ofile=`echo $efile| sed s_err_out_`
80af44ba 36 cat $ofile >> abortout.log
37 cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log
84ddafc8 38 fi
80af44ba 39 cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log
05e3ee70 40
d1513470 41done;
80af44ba 42
05e3ee70 43#
44# connection problems
45#
46rm networkProblem.log
47touch networkProblem.log
48netOK=0;
49netNonOK=0;
50for efile in `cat errRec.log` ;do
51 xxx=`cat $efile| grep tcp_connect`
52 if [ -z "$xxx" ]
53 then
54 let netOK=netOK+1
55 else
56 let netNonOK=netNonOK+1
57 echo $efile >> networkProblem.log
58 fi;
59done;
60#
61# Print stat
62#
d1513470 63echo isOK=$isOK nonOK=$nonOK
05e3ee70 64echo netOK=$netOK netNonOK=$netNonOK
65#
66# filter segmentation fault
67#
68rm seg0.out
69for a in `cat abort.log |sed s_err_out_ ` ;do
70 cat $a | grep 0x | grep \# >> seg0.out
71done;