I wonder where can I get the accurate elapsed time of a job.
(or a real end time of a job. if I can get the real end time, I can use job_endtime - job_starttime as the job’s elapsed time)
After submitting array job in PBS, I execute qdel some of the subjobs before they are finished.
I expected those cancelled subjobs should have a eariler mtime.(I use qstat -xf as the query command)
But when all of the subjobs are finished, the jobs those I cancelled get the same mtime with other subjobs.
look forward the reply. Thank you very much.
In general, not from the pbs attributes, within your script you can have
echo “start ---- $(date +%Y%m%d_%H%M%S)”
echo “end — $(date +%Y%m%d_%H%M%S)”
I think resources_used.walltime should work … you can also look at a job’s end time from its accounting log E record, the field “end” stores the timestamp for when it ended … there’s a different E record printed for each subjob so you can also use the timestamp of the E record itself
thank you so much. but the job scripts are written by someone else. I cannot rely on the jobs’ log.
You can look into execjob_epilogue and execjob_prologue hooks
The accounting logs are created in openpbs at this location $PBS_HOME/server_priv/accounting/YYYYMMDD
The accounting logs are human readable text files.
Please let us know the version of openpbs you are running.