[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()



Hi Jaime, et al,

I am coming back with another question about the output of condor_userprio vs the python method getPriorities().
The second column in the output of condor_userprio is called "config quota".Â
Which one is it in the output of getPriorities()?

Here is one example:

# condor_userprio -grouprollup -allusers | grep group_ALICE.alice_pilot_multicore
group_ALICE.alice_pilot_multicore       Â0.25 ByQuota       Â100000.00   Â0     0.00 19486+14:4     Â0

>>> import htcondor
>>> n = htcondor.Negotiator()
>>> for p in n.getPriorities(True):
... Â Â if p['Name'] == 'group_ALICE.alice_pilot_multicore':
... Â Â Â Â print(p)
...

  [
    IsAccountingGroup = true;
    AccumulatedUsage = 0.0;
    AccountingGroup = "group_ALICE";
    WeightedAccumulatedUsage = 0.0;
    LastUsageTime = 0;
    BeginUsageTime = 1682516152;
    Priority = 0.0;
    Name = "group_ALICE.alice_pilot_multicore";
    PriorityFactor = 1.000000000000000E+05;
    ResourcesUsed = 0;
    Requested = 0.0;
    WeightedResourcesUsed = 0.0
  ]

I don't see that 0.25 in the classAd from the python method. What am I missing?Â

Thanks a lot in advance.Â
Cheers,
Jose



El jue, 9 feb 2023 a las 13:46, Jose Caballero (<jcaballero.hep@xxxxxxxxx>) escribiÃ:
Thanks a lot, Jamie.
We will check if we can get the sum of WeightedResourcesUsed and see
if it matches.
Thanks for the explanation.

Cheers,
Jose

El miÃ, 8 feb 2023 a las 15:48, Jaime Frey via HTCondor-users
(<htcondor-users@xxxxxxxxxxx>) escribiÃ:
>
> 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
>
>
> _______________________________________________
> 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/