Our Condor Installation
Objective of this exercise
This exercise should help you understand the basics of how Condor is installed, what Condor processes (a.k.a. daemons) are running, and what they do.
Before you start, make sure you are logged into one of the treinamentoXX
machines ([00] < XX < [20]). You should have been given your name and password when you arrived at the school.
How do you know what version of Condor you are using? Try condor_version
:
% condor_version
$CondorVersion: 7.4.4 Oct 13 2010 BuildID: 279383 $
$CondorPlatform: X86_64-LINUX_DEBIAN50 $
You might be surprised that it reports Debian 5.0 instead of Ubuntu. It is reporting the operating system that it was compiled on, not the operating system that is in use. Don't worry, the Debian binaries work just fine on Ubuntu.
Extra Tip: The OS version
Do you know how to find the OS version? You can usually look in /etc/issue to find out:
% cat /etc/issue
Ubuntu 10.04.1 LTS \n \l
Or you can run:
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Where is Condor installed?
% which condor_q
/opt/condor/bin/condor_q
Condor has some configuration files that it needs to find. It finds them because we have put CONDOR_CONFIG into your environment:
% echo $CONDOR_CONFIG
/opt/condor/etc/condor_config
Condor has some directories that it keeps records of jobs in. Remember that each submission computer keeps track of all jobs submitted to it. That's in the local directory:
% condor_config_val -v LOCAL_DIR
LOCAL_DIR: /opt/condor/scratch
Defined in '/opt/condor/scratch/condor_config.local', line 17.
% ls -CF /opt/condor/scratch
condor_config.local execute/ log/ spool/
The spool directory is where Condor keeps the jobs you submit, while the execute directory is where Condor keeps running jobs. Since this is a submission-only computer, it should be empty.
Check if Condor is running:
% ps auwx | grep condor_ | grep -v grep
daemon 1541 0.0 0.1 33992 3596 ? Ss Dec06 0:07 /opt/condor/sbin/condor_master
daemon 1542 0.0 0.2 34544 4880 ? Ss Dec06 0:00 condor_schedd -f
daemon 1543 0.0 0.2 34384 4936 ? Ss Dec06 0:15 condor_startd -f
root 1546 0.0 0.1 22612 3172 ? S Dec06 0:03 condor_procd -A /tmp/condor-lock.treinamento010.0161995238895578/procd_pipe.SCHEDD -S 60 -C 1
This computer only has Condor processes running: the condor_master, the condor_schedd, and the condor_procd. (Actually, you might see more, because we have two versions of Condor running. More about that on Wednesday.) In general, you might see many different Condor processes. Here's a list of the processes:
- condor_master: This program runs constantly and ensures that all other parts of Condor are running. If they hang or crash, it restarts them.
- condor_schedd: If this program is running, it allows jobs to be submitted from this computer--that is, your computer is a "submit machine". This will advertise jobs to the central manager so that it knows about them. It will contact a condor_startd on other execute machines for each job that needs to be started.
- condor_procd: This process helps Condor track process (from jobs) that it creates
- condor_collector: This program is part of the Condor central manager. It collects information about all computers in the pool as well as which users want to run jobs. It is what normally responds to the condor_status command. At the school, it is running on a different computer, and you can figure out which one:
% condor_config_val COLLECTOR_HOST
treinamento02.ncc.unesp.br
- condor_negotiator: This program is part of the Condor central manager. It decides what jobs should be run where. It is run on the same computer as the collector.
- condor_startd: If this program is running, it allows jobs to be started up on this computer--that is, your computer is an "execute machine". This advertises your computer to the central manager so that it knows about this computer. It will start up the jobs that run.
- condor_shadow: For each job that has been submitted from this computer, there is one condor_shadow running. It will watch over the job as it runs remotely. In some cases it will provide some assistance (see the standard universe later.) You may or may not see any condor_shadow processes running, depending on what is happening on the computer when you try it out.
You can find out what jobs have been submitted on your computer with the condor_q command:
% condor_q
-- Submitter: treinamento01.ncc.unesp.br : <200.145.46.65:56001> : treinamento01.ncc.unesp.br
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
0 jobs; 0 idle, 0 running, 0 held
Nothing is running right now. If something was running, you would see output like this:
% condor_q
-- Submitter: treinamento01.ncc.unesp.br : <200.145.46.65:56001> : treinamento01.ncc.unesp.br
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
9.0 zmiller 12/7 05:23 0+00:00:06 R 0 0.0 test.sh 60
9.1 zmiller 12/7 05:23 0+00:00:09 R 0 0.0 test.sh 60
9.2 zmiller 12/7 05:23 0+00:00:09 R 0 0.0 test.sh 60
9.3 zmiller 12/7 05:23 0+00:00:09 R 0 0.0 test.sh 60
9.4 zmiller 12/7 05:23 0+00:00:09 R 0 0.0 test.sh 60
5 jobs; 0 idle, 5 running, 0 held
The output that you see will be different depending on what jobs are running. Notice what we can see from this:
- ID: We can see each jobs cluster and process number. For the first job, the cluster is 9 and the process is 0.
- OWNER: We can see who owns the job.
- SUBMITTED: We can see when the job was submitted
- RUN_TIME: We can see how long the job has been running.
- ST: We can see what the current state of the job is. I is idle, R is running.
- PRI: We can see the priority of the job.
- SIZE: We can see the memory consumption of the job.
- CMD: We can see the program that is being executed.
Extra credit
What else can you find out with condor_q? Try any one of:
Double bonus points
How do you use the -constraint or -format options to condor_q? When would you want them? When would you use the -l option? This might be an easier exercise to try once you submit some jobs.
You can find out what computers are in your Condor pool. (A pool is similar to a cluster, but it doesn't have the connotation that all computers are dedicated full-time to computation: some may be desktop computers owned by users.) To look, use condor_status:
% condor_status
Name OpSys Arch State Activity LoadAv Mem ActvtyTime
slot1@treinamento0 LINUX X86_64 Unclaimed Idle 0.030 498 0+02:47:07
slot2@treinamento0 LINUX X86_64 Unclaimed Idle 0.000 498 0+06:47:21
slot3@treinamento0 LINUX X86_64 Unclaimed Idle 0.000 498 0+06:47:22
slot4@treinamento0 LINUX X86_64 Unclaimed Idle 0.000 498 0+06:47:23
slot1@treinamento0 LINUX X86_64 Unclaimed Idle 0.040 498 0+02:46:09
slot2@treinamento0 LINUX X86_64 Unclaimed Idle 0.000 498 0+06:46:26
slot3@treinamento0 LINUX X86_64 Unclaimed Idle 0.000 498 0+06:46:27
...
Each computer shows up four or times, with a slotN at the beginning of the name. This is because we've configured Condor to be able to run multiple jobs per computer. Slot refers to "job slot". (These are multi-core computers.)
Let's look at exactly what you can see:
- Name: The name of the computer. Sometimes this gets chopped off, like above.
- OpSys: The operating system, though not at the granularity you may wish: It says "Linux" instead of which distribution and version of Linux.
- Arch: The architecture, such as INTEL or PPC.
- State: The state is often Claimed (when it is running a Condor job) or Unclaimed (when it is not running a Condor job). It can be in a few other states as well, such as Matched.
- Activity: This is usually something like Busy or Idle. Sometimes you may see a computer that is Claimed, but no job has yet begun on the computer. Then it is Claimed/Idle. Hopefully this doesn't last very long.
- LoadAv: The load average on the computer.
- Mem: The computers memory in megabytes.
- ActvtyTime: How long the computer has been doing what it's been doing.
Extra credit
What else can you find out with condor_status? Try any one of:
Note in particular the options like -master and -schedd. When would these be useful? When would the -l option be useful?