Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Perform condor_q, condor_status selections on Requirements
- Date: Fri, 31 Jul 2015 13:32:52 -0500
- From: Brian Bockelman <bbockelm@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Perform condor_q, condor_status selections on Requirements
Hi Max,
Iâm not sure I completely understand your email. Are you asking if thereâs a way to filter a set of ClassAds based on whether thereâs a symmetric match with a given ad instead of a constraint?
If so, I think the silly script below might help. *NOTE* the python bindings are a bit more restrictive on scoping than condor_q. So, if you replace the job requirements below with:
Requirements = SlotID =?= 1;
(no explicit TARGET), it wonât work.
If you donât want a symmetric match, you can do:
job.matches(machine)
to determine whether the job ClassAd matches machineâs REQUIREMENTS expression. Of course,
job.symmetricMatch(machine)
is equivalent to:
job.symmetricMatch(machine) && machine.symmetricMatch(job)
Brian
import classad
import htcondor
job = classad.ClassAd("""
[
RequestMemory = 500;
RequestCPUs = 3;
RequestDisk = 1;
Requirements = TARGET.SlotID =?= 1;
]
""")
coll = htcondor.Collector()
for machine in coll.query(htcondor.AdTypes.Startd):
if job.symmetricMatch(machine):
print machine["Name"]
> On Jul 31, 2015, at 9:49 AM, Fischer, Max (SCC) <max.fischer@xxxxxxx> wrote:
>
> Hi all,
>
> we are currently trying to select jobs and startds from condor_q and condor_status for monitoring purposes. The problem is that our criteria mostly work with REQUIREMENT and RANK attributes of the ClassAds which cannot be used with -constraint.
> My guess is that is due to them requiring a TARGET for evaluation.
>
> Our solution so far is to do grepâs and similar on the output of condor_q and condor_status with the -format option. This however seems inefficient and prone to failure when users get creative (e.g. when using intricate regexp for machine selection).
>
> Is there a way to apply condor_q/condor_status -constraint to ClassAd attributes requiring a TARGET? Can we perhaps actually supply a TARGET ClassAd for the evaluation? Is this possible with the python bindings perhaps?
>
> Cheers,
> Max
>
>
>
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/