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 | # |
9 | isOK=0 |
d1513470 |
10 | nonOK=0 |
80af44ba |
11 | # |
84ddafc8 |
12 | rm abort.log |
13 | rm abortout.log |
80af44ba |
14 | rm syswatchAbort.log |
15 | rm syswatchAll.log |
16 | echo hname/C:sname/C:id0/I:id1/I:id2/I:first/I:stampSec/I:mi.fMemUsed/F:mi.fSwapUsed/F:cI.fUser/F:cI.fSys/F:pI.fMemResident/F:pI.fMemVirtual/F:pI.fCpuUser/F:pI.fCpuSys/F:stampOldSec/I:miOld.fMemUsed/F:miOld.fSwapUsed/F:cIOld.fUser/F:cIOld.fSys/F:pIOld.fMemResident/F:pIOld.fMemVirtual/F:pIOld.fCpuUser/F:pIOld.fCpuSys/F > syswatchAbort.log |
17 | |
18 | echo hname/C:sname/C:id0/I:id1/I:id2/I:first/I:stampSec/I:mi.fMemUsed/F:mi.fSwapUsed/F:cI.fUser/F:cI.fSys/F:pI.fMemResident/F:pI.fMemVirtual/F:pI.fCpuUser/F:pI.fCpuSys/F:stampOldSec/I:miOld.fMemUsed/F:miOld.fSwapUsed/F:cIOld.fUserF:cIOld.fSys/F:pIOld.fMemResident/F:pIOld.fMemVirtual/F:pIOld.fCpuUser/F:pIOld.fCpuSys/F > syswatchAll.log |
19 | |
20 | # |
d1513470 |
21 | for efile in `cat errRec.log` ;do |
22 | xxx=`cat $efile| grep segmentation` |
84ddafc8 |
23 | xxx=$xxx`cat $efile| grep Aborted` |
80af44ba |
24 | sysfile=`echo $efile| sed s_err.log_syswatch.log_` |
25 | # |
26 | if [ -z "$xxx" ] |
84ddafc8 |
27 | then |
28 | let isOK=isOK+1 |
29 | else |
30 | let nonOK=nonOK+1 |
31 | echo nonOK=$nonOK |
32 | echo "$efile" >>abort.log |
33 | echo $efile |
34 | ofile=`echo $efile| sed s_err_out_` |
80af44ba |
35 | cat $ofile >> abortout.log |
36 | cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log |
84ddafc8 |
37 | fi |
80af44ba |
38 | cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log |
d1513470 |
39 | done; |
80af44ba |
40 | |
d1513470 |
41 | #get the list |
42 | echo isOK=$isOK nonOK=$nonOK |