File indexing completed on 2025-01-31 09:21:54
0001
0002
0003
0004 CEXMC_PREFIX=cexmc_
0005
0006 qstat -u $USER
0007
0008 jobids=`qstat -u $USER | sed '1,2d' | grep $CEXMC_PREFIX | awk '{print $1}'`
0009 jobbasenames=`qstat -u $USER -r | grep 'Full jobname' | grep $CEXMC_PREFIX | \
0010 awk '{print $3}'`
0011 jobnames=""
0012
0013 i=1
0014 for jobbasename in $jobbasenames ; do
0015 jobnames=$jobnames' '$jobbasename.o`echo $jobids | awk "{print \\$$i}"`
0016 (( ++i ))
0017 done
0018
0019 i=1
0020 echo ---------------
0021 for job in $jobnames ; do
0022 msgperc="N/A"
0023 fdbsize="N/A"
0024 edbsize="N/A"
0025 countPolicy=""
0026 ordered=""
0027 current=""
0028 if [ -e "$job" ] ; then
0029 countPolicy=`head -120 "$job" | \
0030 awk '/^\/cexmc\/run\/eventCountPolicy/ {print $2}'`
0031 if [[ -z "$countPolicy" || "$countPolicy" = "all" ]] ; then
0032 ordered=`head -120 "$job" | awk '/^\/run\/beamOn/ {print $2}'`
0033 current=`tail -120 "$job" | grep ^Event | tail -1 | \
0034 awk '{print $2}'`
0035 fi
0036 fi
0037 if [ -z "$current" ] ; then
0038 current=0
0039 fi
0040 if [ -n "$ordered" ] ; then
0041 msgperc=$(( current * 100 / ordered ))%
0042 fi
0043 jobbasename=`echo $jobbasenames | awk "{print \\$$i}"`
0044 jobbasename=${jobbasename/$CEXMC_PREFIX/}
0045 jobbasename=${jobbasename/\.job/}
0046 if [ -e $CEXMC_PROJECTS_DIR/$jobbasename.fdb ] ; then
0047 fdbsize=`du -sh $CEXMC_PROJECTS_DIR/$jobbasename.fdb | awk '{print $1}'`
0048 fi
0049 if [ -e $CEXMC_PROJECTS_DIR/$jobbasename.edb ] ; then
0050 edbsize=`du -sh $CEXMC_PROJECTS_DIR/$jobbasename.edb | awk '{print $1}'`
0051 fi
0052 echo $job: $msgperc, fdb: $fdbsize, edb: $edbsize
0053 (( ++i ))
0054 done
0055