Changeset 19469 for trunk/DataCheck/Monitoring
- Timestamp:
- 03/29/19 14:33:41 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Monitoring/CheckSwiftSchedule.sh
r19425 r19469 68 68 #lynx -width 200 -nolist -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$nextday | grep $nextday >> $schedulefile 69 69 links -width 300 -ssl.certificates 0 -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$nextday | grep $nextday >> $schedulefile 70 # fixme: find out why sometimes second day is missing in file (probably just put online late) 70 71 71 72 # check if schedule is empty … … 79 80 # grep only the columns which are needed 80 81 #cat $schedulefile | sed -r -e 's/[0-9]{5,6}[\ ]{1,4}[0-9]{1,3}[\ ]{1,6}//' | grep -o -E '^[\ ]{1,20}20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ 20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ [A-Z1-4]([A-Za-z0-9][\ \.\+\-]?){3,20}' > $schedulefile2 81 cat $schedulefile | awk '{print $1" "$2" "$3" "$4" "$7" "$8" "$9}' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}$//' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}\ $//' > $schedulefile282 cat $schedulefile | awk -v d1=$date2 -v d2=$nextday '{ if (($1 ~ d1 && $2 ~ /^18|^19|^20|^21|^22|^23/) || ( $1 ~ d2 && $2 ~ /^0/)) print $1" "$2" "$3" "$4" "$7" "$8" "$9}' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}$//' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}\ $//' > $schedulefile2 82 83 83 84 # output list of sources … … 99 100 for (( i=0; i<${#sources[@]}; i++ )) 100 101 do 101 sourceline=`grep "${sources[$i]}" $schedulefile2` 102 if [ "$sourceline" = "" ] 103 then 104 continue 105 fi 106 dat=`echo $sourceline | awk '{ print $1 }' | sed -e 's/-/\//g'` 107 #echo $dat 108 hour=`echo $sourceline | awk '{ print $2 }' | awk -F':' '{ print $1 }'` 109 if [ $hour -gt 12 ] && [ "$dat" != "$date" ] 110 then 111 continue 112 fi 113 if [ $hour -lt 12 ] && [ "$dat" == "$date" ] 114 then 115 continue 116 fi 117 #echo "--"$hour"--" 118 echo $sourceline >>$schedulefile3 102 grep "${sources[$i]}" $schedulefile2 >>$schedulefile3 119 103 done 120 104 … … 125 109 echo -e "\nNone of the sources was found in the Swift schedule." >> $schedulefile3 126 110 else 127 echo -n $date": " && cat $schedulefile3 | grep -v Searched111 echo "night of "$date": " && cat $schedulefile3 | grep -v Searched | sort 128 112 fi 129 113
Note:
See TracChangeset
for help on using the changeset viewer.