-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckbadtasks.csh
More file actions
executable file
·77 lines (69 loc) · 1.76 KB
/
checkbadtasks.csh
File metadata and controls
executable file
·77 lines (69 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#! /bin/csh -f
set TIME_CONVERT = /home/jsoc/cvs/Development/JSOC/bin/$JSOC_MACHINE/time_convert
@ YEAR = `date +%Y`
set bad = 0
foreach ticket ( $WORKFLOW_DATA/tasks/*/active/*$YEAR*/ticket )
@ lines = `wc -l $ticket | awk '{print $1}'`
if ( $lines < 5 ) then
echo ""
echo "*** BAD TICKET(S) ***"
ls $ticket
set bad = 1
endif
end
foreach low ( `ls -1 $WORKFLOW_DATA/gates/*/low | grep -v lev0 | grep -v Synop | grep -v Limb | grep -v harpImages` )
@ lines = `wc -l $low | awk '{print $1}'`
if ( $lines < 1 ) then
echo ""
echo "*** BAD LOW FILE(S) ***"
ls $low
set bad = 1
endif
set Ltime = `cat $low`
@ Ltime_s = `$TIME_CONVERT time=$Ltime`
if ( $Ltime_s < 0 ) then
echo ""
echo "*** BAD LOW FILE(S) ***"
ls $low
set bad = 1
endif
end
foreach high ( `ls -1 $WORKFLOW_DATA/gates/*/high | grep -v lev0 | grep -v Synop | grep -v Limb | grep -v harpImages` )
@ lines = `wc -l $high | awk '{print $1}'`
if ( $lines < 1 ) then
echo ""
echo "*** BAD HIGH FILE(S) ***"
ls $high
set bad = 1
endif
set Htime = `cat $high`
@ Htime_s = `$TIME_CONVERT time=$Htime`
if ( $Htime_s < 0 ) then
echo ""
echo "*** BAD HIGH FILE(S) ***"
ls $high
set bad = 1
endif
end
foreach next ( $WORKFLOW_DATA/gates/*/nextupdate )
@ lines = `wc -l $next | awk '{print $1}'`
if ( $lines < 1 ) then
echo""
echo "*** BAD NEXTUPDATE FILE(S) ***"
ls $next
set bad = 1
endif
set nextt = `cat $next`
@ nextt_s = `$TIME_CONVERT time=$nextt`
if ( $nextt_s < 0 ) then
echo ""
echo "*** BAD NEXTUPDATE FILE(S) ***"
ls $next
set bad = 1
endif
end
if ( $bad == 0 ) then
echo ""
echo "All tickets, low, high, and nextupdate files are OK."
echo ""
endif