$seoHelper.renderFullSimple($sitemeshPage,"{2} - {3}")
Page tree
Skip to end of metadata
Go to start of metadata

Below is a very simple script which accepts a job number as input and outputs a timestamp, priority number, and a ranking for that job as viewed by the Moab scheduler:

 

#!/bin/bash
 
jobid=$1
 
sqResult=`mdiag -p | grep -n ${jobid}`
sqArray=( $sqResult )
stamp=`date`
echo $stamp "  " ${sqArray[0]} "  " ${sqArray[1]}

 

Suppose we save this in a file called "checkpriority.sh".  To run, simply use:

 

./checkpriority.sh <jobid>

 

Your output will look something like this:

 

Wed Oct 22 10:50:56 EDT 2014    140:20571962    346089

 

In the first columns, we have the time/date stamp.  The next column is an aggregate of the ranking of your job (in this case 140th) and the jobid (20571962).  The final column is the accrued job priority value (346089).  Higher priority means your job is closer to running as measured against other users.

Using this script, one might redirect output to append a file.  For example:

 

./checkpriority.sh <jobid>  >> priority.txt

 

In this way, you can watch how the priority of your job changes over time.  One might even setup a local user cron job to check the priority for you, allowing the user to simply review the priority.txt file to observe trend changes over time.