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

Re: [HTCondor-users] Core usage of cluster



On 8/24/2018 6:15 AM, Sean Crosby wrote:
Hi all,

I have come from a Torque/Maui background, where it is easy to show how many cores in the cluster are currently being used

    [root@agtorque ~]# showq | grep "Active Jobs" -A1
      Â108 Active Jobs  Â423 of 452 Processors Active (93.58%)
                 21 of Â21 Nodes Active   (100.00%)


Is there an easy way to get this info in Condor?

I can get slots easily, but that doesn't show how many cores are being used


I'd suggest first passing the "-claimed" flag to condor_status, which constrains the output only to slots that are claimed (i.e. slots in use).

Next, you could use "-af" (for 'autoformat') flag to tell condor_status to only display the Cpus attribute from each claimed slot (see 'man condor_status') like so:

   condor_status -claimed -af cpus

This will output cpu cores in use on each slot, one line per slot. So next you probably want to sum up all those numbers.

My preferred tool for this (and more!) is the awesome 'st' tool ... see
  https://github.com/nferraz/st

But if you don't have st installed, you could use awk (at least awk is always installed...) like so:

  condor_status -claimed -af cpus | awk '{n+=$1} END {print n}'

Hope the above helps.

p.s. you may find this talk on monitoring your pool of interest...

http://research.cs.wisc.edu/htcondor/HTCondorWeek2017/presentations/ThuTannenbaum_Monitoring.pdf

regards,
Todd