Skip to content

Commit

Permalink
Updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesletts committed May 1, 2014
1 parent 7600288 commit df68861
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 22 deletions.
3 changes: 3 additions & 0 deletions condor_check
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ if [ "X"$SHORT == "X" ] ; then SHORT="long" ; fi

# Header
echo Summary Table for glidinWMS pool $POOLNAME at `/bin/date -u`
echo

# Summary Table from the Collector
condor_status -pool $POOLNAME -schedd || exit 2
echo

# Last Negotiation Cycle time
negotime=`condor_status -pool $POOLNAME -nego -l | grep LastNegotiationCycleDuration0 | awk '{print $3}'` || exit 3
echo "Negotiation time = ${negotime}s"
Expand Down
2 changes: 2 additions & 0 deletions condor_functions.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# BUG: -const '(CurrentTime-EnteredCurrentStatus<86400)' is being ignored!

getClassAds() {
# Function to dump a set of ClassAds for queued, running and jobs
# from the past 24h of condor history. If the command fails remotely,
Expand Down
30 changes: 8 additions & 22 deletions condor_history_analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,7 @@ FILE=$glideinWMSMonitor_OUTPUT_DIR/`ls -1rt /crabprod/CSstoragePath/Monitor \
| grep ^monitor-anaops-history | grep \.txt$ | tail -1`
NOW=`ls -l --time-style=+%s $FILE | awk '{print $6}'`

cat <<EOF
HISTORY FILE: $FILE
SCHEDDS CONSIDERED IN THE HISTORY:
Queued
Jobs Schedd Name
EOF
grep '^JobStatus=[125]' $FILE | grep -o GlobalJobId=.* | awk -F\= '{print $2}' | awk -F\# '{print $1}' | sort | uniq -c
cat <<EOF
Done
Jobs Schedd Name
EOF
grep '^JobStatus=[34]' $FILE | grep -o GlobalJobId=.* | awk -F\= '{print $2}' | awk -F\# '{print $1}' | sort | uniq -c
echo
echo HISTORY FILE: $FILE
echo

nabort=`grep "^JobStatus=3" $FILE | wc -l`
Expand Down Expand Up @@ -227,13 +212,14 @@ END {
}
' | grep ^T | sort

exit

echo
echo
echo USER PRIORITIES:
echo
$glideinWMSMonitor_RELEASE_DIR/debug.sh

#echo
#echo
#echo USER PRIORITIES:
#echo
#condor_userprio -all -pool $POOLNAME
#condor_userprio -allusers -all -pool $POOLNAME
condor_userprio -all -pool $POOLNAME

exit
26 changes: 26 additions & 0 deletions debug.sh
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

0 comments on commit df68861

Please sign in to comment.