LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   finished jobs on linux cluster (https://www.linuxquestions.org/questions/linux-newbie-8/finished-jobs-on-linux-cluster-914488/)

zain.hp 11-20-2011 02:51 AM

finished jobs on linux cluster
 
with qstat command i can view running/queue jobs, how can i check the finished/ successfully completed jobs on a linux node.

colucix 11-20-2011 03:20 PM

I usually store the job ID in a variable upon submitting the job, then I check the exit status of qstat in a loop:
Code:

jobid=$(qsub /path/to/my.job)
sleep 5
while qstat $jobid > /dev/null 2>&1
do
  sleep 60
done
echo "job $jobid done"

The first sleep 5 command takes care of any latency (delay) in job submission. Then I force the system to sleep and re-check the job status every 60 seconds. Hope this helps.


All times are GMT -5. The time now is 07:17 PM.