]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/scripts/filterRecLog.sh
M filterRecLog.sh - remove the ssyswatch log parsing - too long
[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
1d980c30 37 #cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log
84ddafc8 38 fi
1d980c30 39 #cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log
d1513470 40done;
80af44ba 41
05e3ee70 42#
43# connection problems
44#
45rm networkProblem.log
46touch networkProblem.log
47netOK=0;
48netNonOK=0;
49for efile in `cat errRec.log` ;do
50 xxx=`cat $efile| grep tcp_connect`
51 if [ -z "$xxx" ]
52 then
53 let netOK=netOK+1
54 else
55 let netNonOK=netNonOK+1
56 echo $efile >> networkProblem.log
57 fi;
58done;
59#
60# Print stat
61#
d1513470 62echo isOK=$isOK nonOK=$nonOK
05e3ee70 63echo netOK=$netOK netNonOK=$netNonOK
64#
65# filter segmentation fault
66#
67rm seg0.out
68for a in `cat abort.log |sed s_err_out_ ` ;do
69 cat $a | grep 0x | grep \# >> seg0.out
70done;