Page History

Turn Off History

How to insert custom ClassAd attributes into a machine ad

Known to work with Condor version: 7.0

In the following exapmles, a custom ClassAd attribute named MachineOwner is created with the value "chemistry". You can use whatever attribute name you want, but avoid conflicting with attribute names used by Condor. See the manual or run

condor_status -long
on a machine to see the attributes that are there.

How to insert custom {quote: ClassAd} attributes in a machine ad via the config file

MachineOwner = "chemistry"
STARTD_ATTRS = $(STARTD_ATTRS) MachineOwner

If you want different values for different slots within the same machine, do this:

SLOT1_MachineOwner = "chemistry"
SLOT2_MachineOwner = "physics"

STARTD_ATTRS = $(STARTD_ATTRS) MachineOwner

How to insert custom {quote: ClassAd} attributes in a machine ad via a script

You can insert dynamic attributes that are periodically updated from a script. Here's an example of what you put in the condor configuration file to periodically call a script:

STARTD_CRON_NAME = CRON
CRON_JOBLIST =

CRON_JOBLIST = $(CRON_JOBLIST) kernel
CRON_kernel_PREFIX = kernel_
CRON_kernel_EXECUTABLE = /path/to/kernel
CRON_kernel_PERIOD = 1h
CRON_kernel_MODE = periodic
CRON_kernel_RECONFIG = false
CRON_kernel_KILL = true
CRON_kernel_ARGS =

The script named 'kernel' could add some attributes that give information about the system kernel. For example, it could output something like the following:

version = "2.6.9-55.0.12.ELsmp"
bigmem = FALSE
hugemem = FALSE

Given the configuration above, this would result in ClassAd attributes being added to the machine ClassAd with the following names: kernel_version, kernel_bigmem, and kernel_hugemem.