-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.sh
More file actions
28 lines (27 loc) · 1.11 KB
/
status.sh
File metadata and controls
28 lines (27 loc) · 1.11 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
#!/bin/bash
RUN=$1
##cmsLs /store/caf/user/`whoami`/GainRun_$RUN | grep ".root" | sed 's;/; ;g;s;.root;;' | awk '{ print $NF }' | sort -n >! done.txt
cmsLs /store/group/dpg_tracker_pixel/comm_pixel/cgalloni/GainRun_$RUN | grep ".root" | sed 's;/; ;g;s;.root;;' | awk '{ print $NF }' | sort -n > done.txt
bjobs | grep $RUN | sed 's;_; ;' | awk '{ print $(NF-3) }' | sort -n > running.txt
rm missing.txt
touch missing.txt
echo "touch missing.txt"
for n in {0..39}
do
echo "in the loop $n"
if [ `grep '^'$n'$' done.txt | wc -l ` -eq 0 ] && [ `grep '^'$n'$' running.txt | wc -l ` -eq 0 ] ; then
echo " wirting $n in missing.txt"
echo "$n" >> missing.txt
fi
done
echo "finish for loop"
echo "jobs with output in: /store/group/dpg_tracker_pixel/comm_pixel/cgalloni/GainRun_$RUN"
echo "jobs with output in: /store/caf/user/`whoami`/GainRun_$RUN"
cat done.txt | tr '\n' ' '; echo
echo "jobs running on lxbatch:"
cat running.txt | tr '\n' ' ' ; echo
echo "missing:"
cat missing.txt | tr '\n' ' ' ; echo
echo "resubmit:"
cat missing.txt | awk '{ print "./Run.sh -resubmit $RUN "$NF }'
##rm done.txt running.txt missing.txt