In the development of the cluster management system, we use PBSPro as a tool for job management, how to get the job information in real time, through the database or command line query?

PBS Pro’s task submission records, scheduling status and other information are stored in the postgresql database.
However, I found that the database does not immediately synchronize the job information each time the job is submitted, and sometimes the job information is not saved in the job_attr table.
I want to develop a cluster management system, including job management, resource management, etc.How do I get the job information in real time during the development process?

Thank you for your attention.

Also, you can use -F json with qstat and pbsnodes commands which will dump results in json which then can be easily parsed by your programs.
Usage: qstat -f -F json
pbsnodes -av -F json

1 Like

Thank you for your reply ,We wanted to develop a job management system based on PBS, where monitoring functions are similar to Compute Manager, and we used Java to implement back-end logic, but we didn’t know how to get job information. For example, job ID, name, state, and so on

Except get the real time job information by running qstat -fx, tracejob, pbs_dtj, and then parse the query results

We are currently using to get job information from PBS postgresql database, but found that all assignments submitted will not be saved to the database, the table “job”, “job_attr”, “job_scr”, especially in most case, it will not save job attributes, so we can’t get the job from PBS database of complete information, under what conditions operation attributes are saved in the “job_attr”? If the job is not saved to the PBS postgresql database, how does the job not saved to the database be saved to memory? And there is a delay in saving to the database, why do jobs submitted through the command line not immediately save to the database?

If you want to get the details from another program, IFL are the way to go.
You can find more details from the Programmer’s guide.

PBS_IFL access from Python, if it helps.

If you are looking for Asynchronous job status notification, this feature is not available yet. See the thread for details:

Relying on PBS database for real time information will not help as jobs and other structures are not immediately saved to database due to operational costs. It is maintained in the program memory.

1 Like

Why would some job attributes be saved in job_attr and some not? Under what conditions does the job hold the property information? Thank you very much