Last change
on this file since 20029 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
|
---|
5 | files=`find /fact/aux/2018/06/2* -type f -name '*log'`
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 | echo ""
|
---|
10 | echo "finding all Torque warnings and calculate some statistics..."
|
---|
11 | echo "------------------------------------------------------------"
|
---|
12 | echo ""
|
---|
13 | for file in $files
|
---|
14 | do
|
---|
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'
|
---|
22 | done
|
---|
23 |
|
---|
24 |
|
---|
25 |
|
---|
26 | echo ""
|
---|
27 | echo "finding all PowerOn and calculate nightly statistics..."
|
---|
28 | echo "-------------------------------------------------------"
|
---|
29 | echo ""
|
---|
30 | for file in $files
|
---|
31 | do
|
---|
32 | num=`grep -c 'PowerOn' $file`
|
---|
33 | echo $file": "$num
|
---|
34 | done
|
---|
35 |
|
---|
36 |
|
---|
37 |
|
---|
38 | echo ""
|
---|
39 | echo "Finding all PowerOn and calculate hourly statistics..."
|
---|
40 | echo "------------------------------------------------------"
|
---|
41 | echo ""
|
---|
42 | for file in $files
|
---|
43 | do
|
---|
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
|
---|
48 | done
|
---|
49 |
|
---|
50 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.