2
votes

I am creating a website which generates PBS-jobs, based on form-input from the user. I would also want to make a page where the user can see the status of a certain project. This includes things like:

  • Submission date (date/time of submitting the job);

    This one is already working. when submitting the job, all information from the form is sent to the database using INSERT INTO ..., including sysdate() as submission date.

  • Queue time (date/time of job entering the queue);

  • Start time (date/time of job starting to run);

  • Time of completion (date/time of script finished);

While the script is running on a Linux-server, I would like PBS to return these things at the respective times while the jobs are running. Maybe qstat could be used for this, but I'm not sure...

Does anyone know a way to return these thing from PBS (or another way) and save these things into a database?

1
What is your question? What are you asking us for help with? - Rocket Hazmat
@ Rocket: Sorry, I had to leave in a hurry when I made this question. I added some more info, I hope it's clearer now. - Fingashpitzzz

1 Answers

1
votes

One option would be to use one of the API's that interfaces with TORQUE. There is the C API that is specified in pbs_ifl.h of the source. There is also a project called pbs python which wrappers the API in python.

Finally, you could grep qstat -f output for these values:

qtime = Fri Feb 14 16:00:01 2014
etime = Fri Feb 14 16:00:01 2014
start_time = Fri Feb 14 16:00:46 2014
comp_time = Fri Feb 14 16:04:08 2014

qtime is an abbreviation for the time the job was queued. etime is an abbreviation for eligible time. comp_time is an abbreviation for the time the job was completed.