ModifyingGridEngine

From UniCluster

Modifying Grid Engine Queues, Hosts, and Environments

Using qconf

Individual queues and hosts, as well as both parallel and checkpointing environments can be modified from the command line, using one of these commands:

 qconf -M{q,e,p,ckpt} <filename>
 
 qconf -m{q,e,p,ckpt} <objname>

These commands open a temporary file in an editor; when you save changes to the file and exit the editor, the system immediately reflects the changes.

When you want to change many objects at once, or want to change object configuration non-interactively, use one of these commands:

 qconf -{a,m,r,d}attr queue|exechost|pe|ckpt <attrib> <value> <queue_list>|<host_list>
 
 qconf -{A,M,R,D}attr queue|exechost|pe|ckpt <filename>

The first command makes modifications according to the specification on the command line. The second command makes modifications according to specifications in a file (see Using Files with qconf for more information).

In both commands, the options are:

  • -A/a: add attribute
  • -M/m: modify attribute
  • -R/r: replace attribute
  • -D/d: delete attribute
  • <attrib>: queue or host attribute to be changed
  • <value>: value of attribute to be affected
  • <filename>: a file containing attribute-value pairs

a, m, d allows you to operate on individual values in a list of values, while r replaces the entire list of values with the one specified, either on the command line or in the file. Here are some examples:

Change the queue type of "tcf27-e019.q" to batch-only:

 % qconf -rattr queue qtype batch tcf27-e019.q

Modify the queue type and shell start behavior of tcf27-e019.q based on the contents of the file "new.cfg":

 % cat new.cfg
 qtype batch interactive checkpointing
 shell_start_mode unix_behavior
 % qconf -Rattr queue new.cfg tcf27-e019.q

Attach the complexes named "storage" and "license" to the host "tcf27-e019":

 % qconf -rattr exechost complex_list storage,license tcf27-e019

Add the resource named "scratch1" with a value of 1000M and "long" with a value of 2:

 % qconf -rattr exechost complex_values scratch1=1000M,long=2 tcf27-e019

Attach the resource named "short" to the host with a value of 4:

 % qconf -aattr exechost complex_values short=4 tcf27-e019

Change the value of "scratch1" to 500M while leaving other values untouched:

 % qconf -mattr exechost complex_values scratch1=500M tcf27-e019

Delete the resource "long":

 % qconf -dattr exechost complex_values long tcf27-e019

Add "tcf27-b011.q" to the list of queues for checkpointing enviroment "sph":

 % qconf -aattr ckpt queue_list tcf27-b011.q sph

Change the number of slots in parallel environment "make" to 50:

 % qconf -mattr pe slots 50 make


Using qselect

qselect outputs a list of queues. If called with options, it lists only queues which match the given specifications. This is very helpful when used in combination with qconf to target specific queues to modify. Here are some examples:

Target all queues on Linux machines:

 % qselect -l arch=glinux

Target all queues on machines with 2 CPUs:

 % qselect -l num_proc=2

Target all queues on all 4 CPU 64-bit Solaris machines:

 % qselect -l arch=solaris64,num_proc=4

Target queues that provide an application license (previously configured):

 % qselect -l app_lic=TRUE

To accomplish wide-reaching changes with a single command, use qselect with qconf. For example, you can use the entire qselect command, enclosed in backticks, in place of the <queue_list> in the qconf command.

To set the prolog script to sol_prolog.sh on all queues on Solaris machines:

 % qconf -mattr queue prolog /usr/local/scripts/sol_prolog.sh `qselect -l arch=solaris`

To set the attribute "fluent_license" to 2 on all queues on two-processor systems:

 % qconf -mattr queue complex_values fluent_license=2 `qselect -l num_proc=2`



Back to Administrative How Tos.