Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Complex policies to kill jobs?
- Date: Wed, 23 Aug 2017 11:11:16 -0400
- From: Jose Caballero <jcaballero.hep@xxxxxxxxx>
- Subject: Re: [HTCondor-users] Complex policies to kill jobs?
2017-08-23 11:04 GMT-04:00 Greg Thain <gthain@xxxxxxxxxxx>:
> On 08/23/2017 09:26 AM, Jose Caballero wrote:
>>
>> Hi,
>>
>>
>> I am not sure this is even possible. Unclear to me from the documentation.
>>
>> Let's say that I have, for example, 10 running jobs and 10 idle jobs.
>> And I want to kill 15 of them, with the following policies:
>> -- first, as many idle as possible (in this case, the 10 of them)
>> -- then, the rest (5) from the running ones, sorted by the time they
>> started running, killing younger first.
>>
>> Is there a way to express this type of policies, either with the
>> command line or -preferable- with the python library?
>
>
> Do you want this as a one-time command, or as an ongoing policy? If the
> former, condor_rm doesn't have a rank or limit option, which might be a
> nice feature request, but as a shell one-liner, a quick hack that doesn't
> deal with held jobs or other edge cases:
>
> condor_q -nobatch -af clusterid procid jobsstatus JobCurrentStartTime | sort
> -n -k 3,3r -k 4,4 | awk '{print $1 "." $2}' | tail -15 | xargs condor_rm
>
> should do the trick.
>
> -greg
>
Thanks
I guess that can do the trick.
But I think having the ability to use a ranking expression or similar
will be very useful in the future. In particular to be used with the
python libs.
Cheers,
Jose