问题
Is there a way to check the status of the specific job (e.g by cluster/process id) and how to retrieve those ids when job is submitted?
回答1:
For further reference i solved this by Condor's ClassAd Mechanism.
I inserted a custom ClassAd attribute in my condor.submit file:
+customAttribute = myID;
Then i can check for example JobStatus for this Job by:
condor_q -constraint 'customAttribute == myID' -f "%s" JobStatus
回答2:
This is possible without requiring a custom ClassAd, as per micco's suggestion (though I can envisage situations where this would be desirable).
You can provide the condor_q command with either a cluster/process ID to return its status, e.g. the following to return the status of job 5:
condor_q 5
Furthermore, if you are submitting clusters of jobs, you can retrieve the status of particular jobs within the batch using the following e.g. for task 123 within cluster 5:
condor_q 5.123
来源:https://stackoverflow.com/questions/21781299/how-can-i-check-the-status-of-the-specific-job-that-was-send-to-htcondor