Explore condor status
Explore condor_status[edit | edit source]
The goal of this exercise is try out some of the most common options to the
condor_status command, so that you can view slots effectively.
The main part of this exercise should take just a few minutes, but if you have more time later, come back and work on the extension ideas at the end to become a
Selecting Slots [edit | edit source]
condor_status program has many options for selecting which slots are listed. You've already learned the basic
condor_status and the
condor_status -compactvariation (which you may wish to retry now, before proceeding).
$ condor_status -avail
condor_statusoutput, not just with the
-availoption. Similar to
condor_q, you can limit the slots that are listed in two easy ways. To list just the slots on a specific machine:
$ condor_status <hostname>
$ condor_status htcondor-10.os-internal Name OpSys Arch State Activity LoadAv Mem ActvtyTime email@example.com LINUX X86_64 Unclaimed Idle 0.000 3790 0+17:19:50 Machines Owner Claimed Unclaimed Matched Preempting Drain X86_64/LINUX 1 0 0 1 0 0 0 Total 1 0 0 1 0 0 0
$ condor_status <slot>@<hostname>
Note: You can name more than one hostname, slot, or combination thereof on the command line, in which case slots for all of the named hostnames and/or slots are listed.
Let’s get some practice using
- List all slots in the pool — how many are there total?
- Practice using all forms of
condor_statusthat you have learned:
- List the available slots
- List the slots on a specific machine
- List a specific slot from that machine
- Try listing the slots from a few (but not all) machines at once
- Try using a mix of hostnames and slot IDs at once
Viewing a Slot ClassAd [edit | edit source]Just as with
condor_q, you can use
condor_statusto view the complete ClassAd for a given slot (often confusingly called the “machine” ad):
$ condor_status -l <hostname>
Name = "firstname.lastname@example.org" NextFetchWorkDelay = -1 NumDynamicSlots = 0 NumPids = 0 OpSys = "LINUX" OpSysAndVer = "CentOS7" OpSysLegacy = "LINUX" OpSysLongName = "CentOS Linux release 7.3.1611 (Core)" OpSysMajorVer = 7 OpSysName = "CentOS"
Go ahead and examine a machine ClassAd now.
Viewing Slots by ClassAd Expression [edit | edit source]
Often, it is helpful to view slots that meet some particular criteria. For example, if you know that your job needs a lot of memory to run, you may want to see how many high-memory slots there are and whether they are busy. You can filter the list of slots like this using the
-constraint option and a ClassAd expression.
$ condor_status -const 'OpSysAndVer =?= "CentOS7" && regexp("htcondor-1\d", Machine)'
') are for the shell, so that the entire expression is passed to
condor_statusuntouched, and the double quotes (
") surround a string value within the expression itself.
If you are interested in learning more about writing ClassAd expressions, look at section 4.1 and especially 4.1.4 of the HTCondor Manual. This is definitely advanced material, so if you do not want to read it, that is fine. But if you do, take some time to practice writing expressions for the
condor_q command accepts the
-constraint option as well! As you might expect, the option allows you to limit the jobs that are listed based on a ClassAd expression.
Formatting Output (Optional) [edit | edit source]
condor_status command accepts the same
-af) options that
condor_q accepts, and the options have the same meanings in both commands. Of course, the attributes available in machine ads may differ from the ones that are available in job ads. Use the HTCondor Manual or look at individual slot ClassAds to get a better idea of what attributes are available.