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:


sqResult=`mdiag -p | grep -n ${jobid}`
sqArray=( $sqResult )
echo $stamp "  " ${sqArray[0]} "  " ${sqArray[1]}


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


./ <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:


./ <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.