source: trunk/DataCheck/Tools/check_torque_warning2.sh@ 19662

Last change on this file since 19662 was 19040, checked in by Daniela Dorner, 6 years ago
scripts to check for drive problem
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3
4# choose path according to which time range you want to check
5files=`find /fact/aux/2018/06/2* -type f -name '*log'`
6
7
8
9echo ""
10echo "finding all Torque warnings and calculate some statistics..."
11echo "------------------------------------------------------------"
12echo ""
13for file in $files
14do
15 numall=`grep -c Torque $file`
16 numaz=`grep Torque $file | grep -c Az`
17 numzd=`grep Torque $file | grep -c Zd`
18 numreal=`grep Torque $file | grep -oE 'W>\ [0-9][0-9]:[0-9][0-9]' | uniq -c | wc -l`
19 time=`grep Torque $file | grep -oE 'W>\ [0-9][0-9]:[0-9][0-9]' | uniq -c | head -1 | grep -oE '[0-9][0-9]:[0-9][0-9]'`
20 times=`grep Torque $file | grep -oE 'W>\ [0-9][0-9]:[0-9][0-9]' | uniq -c | grep -oE '[0-9][0-9]:[0-9][0-9]'`
21 echo `basename $file`": "`printf '%02d' $numall`" -> "`printf '%02d' $numreal`" "`printf '%02d' $numaz`" Az "`printf '%02d' $numzd`" Zd first@"$time" ("`echo $times | sed -e 's/\ /|/g'`")" | sed -e 's/\ 0/\ \ /g'
22done
23
24
25
26echo ""
27echo "finding all PowerOn and calculate nightly statistics..."
28echo "-------------------------------------------------------"
29echo ""
30for file in $files
31do
32 num=`grep -c 'PowerOn' $file`
33 echo $file": "$num
34done
35
36
37
38echo ""
39echo "Finding all PowerOn and calculate hourly statistics..."
40echo "------------------------------------------------------"
41echo ""
42for file in $files
43do
44 #echo $file
45 num=`grep -c 'PowerOn' $file`
46 echo $file": "$num
47 grep 'PowerOn' $file | grep -oE 'I> [0-9][0-9]' | uniq -c
48done
49
50
Note: See TracBrowser for help on using the repository browser.