Re: [HTCondor-devel] information from condor


Date: Mon, 21 Dec 2015 13:11:51 -0600
From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
Subject: Re: [HTCondor-devel] information from condor
On 12/21/2015 7:33 AM, åå wrote:
Hi,

I'd like to add some scheduling strategies on HTCondor, so I have to get
the information about job queue, node status and so on. Now I don't know
where to get these informations. Are there APIs or do I have to go to
the source code?

Regards & Thanks,

Kathy


In HTCondor, everything (nodes, jobs, daemons) is represented with a data structure known as a "ClassAd" -- see http://is.gd/RLOmjK

To find out about node status and aggregate job queue information, you will want to send a query to the condor_collector, which is a database of ClassAds including ClassAds on the nodes (so-called machine or startd classads). You can do this with the "condor_status" command-line tool, which when used with "-format" or the "-autoformat" command-line options is very easy to ingest its output into your code. If you really do not want to use the condor_status tool, you can also query the condor_collector via a Python API or via a Web Services (soap) API. Details on both the Python and Web Serives API are in the manual in the chapter titled "Application Programming Interfaces". The Python API is more scalable and widely used these days than the Web Services/SOAP interface, so I would suggest going with Python if possible.
See http://is.gd/1WQouF

To find out detailed job queue information (i.e. if you need to iterate through specific job records), you will need to query the condor_schedd daemons, which contain a database of ClassAds representing individual jobs. You can do this with the "condor_q" command-line tool, and just like condor_status, it has "-format" and "-autoformat". Or again you can use either the Python API or Web Service/SOAP interface if you are adverse to command-line tools.

Hope this helps
Todd


[← Prev in Thread] Current Thread [Next in Thread→]