Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Core usage of cluster
- Date: Fri, 24 Aug 2018 17:10:53 -0500 (CDT)
- From: Todd L Miller <tlmiller@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Core usage of cluster
Is there an easy way to get this info in Condor?
Unfortunately, as far as I know, there's no built-in core-oriented
reporting. To sum all CPUs allocated to running jobs:
condor_status -const 'Activity == "Busy"' -af Cpus | awk '{total += $1}END{print total}'
To sum the actual CPU usage of those running jobs:
condor_status -const 'Activity == "Busy"' -af CPUsUsage | awk '{total += $1}END{print total}'
You can get a lot fancier:
condor_status -const 'Activity == "Busy"' -af CPUsUsage Cpus | \
awk '{usage += $1; total += $2; jobs += 1}END{print jobs " active
jobs are assigned " total " CPUs and are using " usage " of them (" (usage / total)*100 "%)" }'
and get output like
32 active jobs are assigned 32 CPUs and are using 29.428 of them (91.9625%)
The following monster generates a line more like the one in your
example:
condor_status -af Activity CPUsUsage Cpus | awk '/^Busy/{usage += $2; total += $3; jobs += 1}{pooltotal += $3}END{print jobs " active jobs are assigned " total " CPUs (out of " pooltotal ") and are using " usage " of them (" (usage / total)*100 "%). That is " (total / pooltotal) * 100 "% assigned and " (usage / pooltotal) * 100 "% usage." }'
giving output like
13328 active jobs are assigned 14688 CPUs (out of 15636) and are using
13643 of them (92.8853%). That is 93.9371% assigned and 87.2538% usage.
Note that using 'condor_status' to get the data gives a slightly
different view of things than using 'condor_q' (if you have any jobs that
aren't yours running on your cluster, or if you're running any of your
jobs on somebody else's cluster). It should also be faster, but it could
be a few minutes out of date.
- ToddM