]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/filterRecLog.sh
resubmitMissing.sh - resubmit calibration jobns for missing runs
[u/mrichter/AliRoot.git] / TPC / scripts / filterRecLog.sh
1 # marian.ivanov@cern.ch
2 # Filter error logs 
3 # Input   - errRec.logs  - text file with the list of error logs
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
8
9 isOK=0 
10 nonOK=0
11 #
12 rm abort.log
13 rm abortout.log
14 rm syswatchAbort.log
15 rm syswatchAll.log
16 echo 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
17 echo 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
18
19
20 #
21 for efile in `cat errRec.log`  ;do
22  xxx=`cat $efile| grep segmentation`
23  xxx=$xxx`cat $efile| grep Aborted`
24  xxx=$xxx`cat $efile| grep floating`
25  sysfile=`echo $efile| sed s_err_syswatch_`
26  # 
27  if [ -z "$xxx" ]
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_`
36   cat $ofile   >> abortout.log
37   cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log
38  fi
39   cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log
40   
41 done; 
42
43 #
44 # connection problems
45 #
46 rm networkProblem.log
47 touch networkProblem.log
48 netOK=0;
49 netNonOK=0;
50 for 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;
59 done;
60 #
61 # Print stat
62 #
63 echo isOK=$isOK nonOK=$nonOK
64 echo netOK=$netOK netNonOK=$netNonOK
65 #
66 # filter segmentation fault
67 #
68 rm seg0.out
69 for a in `cat  abort.log |sed s_err_out_ ` ;do
70     cat $a | grep 0x | grep \# >> seg0.out
71 done;