SHMGroupRepo/getCrashedJobs.sh

20 lines
694 B
Bash
Raw Normal View History

2021-09-27 12:41:48 +02:00
#!/bin/bash
############################################################
# Script to get jobname for each crashed job #
# If jobname contains event number => get crashed events #
# #
# argument $1 - list of failed hydro jobs #
# you can get that by running 'bash makelist.sh' #
############################################################
if [[ -f "crashed_jobs.txt" ]]; then ## delete previous list
rm crashed_jobs.txt
fi
for item in `cat $1` ## loop over crashed job IDs
do
#echo $item
sacct -j $item --format=Jobname >> crashed_jobs.txt ## gets a jobname for each job
done