{section: How to insert custom ClassAd attributes into a machine ad} Known to work with HTCondor version: 7.0 In the following exapmles, a custom {quote: 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 HTCondor. See the manual or run {code}condor_status -long{endcode} on a machine to see the attributes that are there. {subsection: How to insert custom ClassAd attributes in a machine ad via the config file} Using the config file to insert a custom machine attribute is particularly appropriate for static attribute values that do not change often - if your attribute value is dynamic, see below. {code} MachineOwner = "chemistry" STARTD_ATTRS = $(STARTD_ATTRS) MachineOwner {endcode} If you want different values for different slots within the same machine, do this: {code} SLOT1_MachineOwner = "chemistry" SLOT2_MachineOwner = "physics" STARTD_ATTRS = $(STARTD_ATTRS) MachineOwner {endcode} *Alternate*. If you are using HTCondor 8.3.8 or later, you can set different attributes in different slot *types*. This makes configuration simpler when the number of slots (and thus the slot id's) is not fixed, but varies based on some other configuration value such as NUM_CPUS {code} NUM_SLOTS_TYPE_1 = 2 NUM_SLOTS_TYPE_2 = $(NUM_CPUS) - $(NUM_SLOTS_TYPE_1) STARTD_ATTRS = MachineOwner $(STARTD_ATTRS) SLOT_TYPE_1_MachineOwner = "chemistry" SLOT_TYPE_2_MachineOwner = "physics" {endcode} {subsection: How to insert custom 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 HTCondor configuration file to periodically call a script: {code} STARTD_CRON_JOBLIST = 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 = {endcode} The script named 'kernel' could add some attributes that give information about the system kernel. For example, it could output something like the following: {code} version = "2.6.9-55.0.12.ELsmp" bigmem = FALSE hugemem = FALSE {endcode} Given the configuration above, this would result in {quote: ClassAd} attributes being added to the machine {quote: ClassAd} with the following names: kernel_version, kernel_bigmem, and kernel_hugemem. {subsection: How to insert a custom ClassAd attribute into a machine ad from the Windows registry} New in 7.5.6: A list of windows registry keys may be specified in the configuration file to be published in the machine {quote: ClassAd}. Example: {code} STARTD_PUBLISH_WINREG = \ Perl_BinDir = HKLM\Software\Perl\BinDir; \ Kerberos_Version = HKLM\SOFTWARE\MIT\Kerberos\Client\CurrentVersion\VersionString {endcode}