title: how to get status of finished or aborted jobs in qsub/torque
body: <p>Using torque, if I run a job with qsub with particular arguments, the job finishes and three things happen.  1) I get a file.eXXXX file containing the stderr of the process 2) I get a file.oXXXX file containing the stdout of the process 3) I receive an email with information such as allocation and exit status.</p>
  
  <p>I'd like to have this status information in a file next to the .oXXXX and .eXXXX files, because it is too difficult to correlate 100s of emails with 100s of job output files especially several days later.  I can't find such a capability built in.  Nevertheless I noticed that I can use "qstat -f job-id" to get information pretty similar to what's in the email.  But I don't see in the documentation how long a delay I am allowed for running qstat.</p>
  
  <p>I thought about after launching the job A with qsub, thereafter use the job ID to launch a dependent job B (qsub -W depend=...) which will run "qstat -f" of the id of A, communicating id-A via an environment variable.   However, I don't know how far in the future job B will run.  Also if job B is not run on the same node as A, will qstat be able to find the correct information?</p>
  
  <p>My idea seems convoluted.  Isn't there an easier/better way of doing this?</p>
  
  <p>I don't think this can be done by installing some sort of email monitor, because I read my email on a completely different machine which does not have access to the compute cluster.</p>