Adding a flag to Single Muon analysis task to produce a tree as output. Minor fixes...
[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#
3b9b13ee 12rm -f abort.log
13rm -f abortout.log
14rm -f syswatchAbort.log
15rm -f syswatchAll.log
16rm -f seg0.out
17
05e3ee70 18echo 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
19echo 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 20
80af44ba 21
22#
d1513470 23for efile in `cat errRec.log` ;do
24 xxx=`cat $efile| grep segmentation`
84ddafc8 25 xxx=$xxx`cat $efile| grep Aborted`
05e3ee70 26 xxx=$xxx`cat $efile| grep floating`
27 sysfile=`echo $efile| sed s_err_syswatch_`
80af44ba 28 #
29 if [ -z "$xxx" ]
84ddafc8 30 then
31 let isOK=isOK+1
32 else
33 let nonOK=nonOK+1
34 echo nonOK=$nonOK
35 echo "$efile" >>abort.log
36 echo $efile
37 ofile=`echo $efile| sed s_err_out_`
80af44ba 38 cat $ofile >> abortout.log
1d980c30 39 #cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log
84ddafc8 40 fi
1d980c30 41 #cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log
d1513470 42done;
80af44ba 43
05e3ee70 44#
45# connection problems
46#
47rm networkProblem.log
48touch networkProblem.log
49netOK=0;
50netNonOK=0;
51for efile in `cat errRec.log` ;do
52 xxx=`cat $efile| grep tcp_connect`
53 if [ -z "$xxx" ]
54 then
55 let netOK=netOK+1
56 else
57 let netNonOK=netNonOK+1
58 echo $efile >> networkProblem.log
59 fi;
60done;
61#
62# Print stat
63#
d1513470 64echo isOK=$isOK nonOK=$nonOK
05e3ee70 65echo netOK=$netOK netNonOK=$netNonOK
66#
67# filter segmentation fault
68#
05e3ee70 69for a in `cat abort.log |sed s_err_out_ ` ;do
70 cat $a | grep 0x | grep \# >> seg0.out
71done;