-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7600288
commit df68861
Showing
4 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
count_entries_in_history_file() { | ||
STATUS=$1 | ||
TITLE=$2 | ||
echo | ||
echo $TITLE | ||
printf "%-35s %-35s %15s\n" "schedd Name" "Earliest Entry" "Number of Jobs" | ||
#SCHEDDS=`cat $FILE | awk -F\= '{print $NF}' | awk -F\# '{print $1}' | sort | uniq | sort` | ||
SCHEDDS=`condor_status -schedd -format '%s\n' Name` | ||
for SCHEDD in $SCHEDDS ; do | ||
grep ^JobStatus=$STATUS $FILE | grep $SCHEDD | grep -o 'EnteredCurrentStatus=[0-9]*' \ | ||
| awk -F\= -v now=`/bin/date +%s` -v schedd=$SCHEDD \ | ||
'BEGIN{x=now;n=0}{if($2<x){x=$2};n+=1}END{printf("%-35s %-35s %15i\n",schedd,strftime("%c",x),n)}' | ||
done | ||
} | ||
|
||
echo | ||
echo "====================================== BEGIN DEBUG =======================================" | ||
count_entries_in_history_file 4 "COMPLETED JOBS:" | ||
count_entries_in_history_file 3 "REMOVED JOBS:" | ||
count_entries_in_history_file 5 "HELD JOBS:" | ||
echo "======================================= END DEBUG ========================================" | ||
echo | ||
|
||
exit |