[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] How to get info about "number of users" using python method getPriorities()



Your use of htcondor.Negotiator().getPriorities(True) should be giving you the same data that condor_userprio receives from the negotiator.
I believe the 46479 is aligned under the "Wghted In Useâ column. The value is the sum of all of the individual values in that column, which come from the WeightedResourcesUsed attribute of the accounting ads.

Iâll note that without the -grouprollup and -allusers options, condor_userprio will query the collector for the accounting ads instead of the negotiator and filters out users who havenât used any resources in the past day.

 - Jaime

> On Feb 7, 2023, at 9:08 AM, Jose Caballero <jcaballero.hep@xxxxxxxxx> wrote:
> 
> Hi,
> 
> We have a very old script that gets some information from the CLI
> command "condor_userprio -grouprollup -allusers".
> Among other things, the script pays attention to the very last line of
> the output:
> 
>        [root@htcondor-cm] # condor_userprio -grouprollup -allusers
>        ...
>        ...
>        Number of users: 55 ByQuota 46479 173468912.00
> 
> The script cares about the number 46479.
> 
> We are trying to get the same info using the python bindings. So far,
> we had a look to
> 
>        htcondor.Negotiator().getPriorities(True)
> 
> but we don't really see a way to get that same value 46479.
> Is it not possible? Do we need to call a different method?
> 
> Any suggestion is more than welcome.
> Thanks a lot in advance.
> Cheers,
> Jose