You can modify individual queues, hosts, parallel environments, and checkpointing environments from the command line. Use the qconf command in combination with other commands.
If you have already prepared a file, type the qconf command with appropriate options:
qconf -Me qconf -Mq qconf -Mckpt qconf -Mp |
If you have not prepared a file, type the qconf command with appropriate options:
qconf -me qconf -mq qconf -mckpt qconf -mp |
The –Me and –me options modify execution hosts.
The –Mq and –mq options modify queues.
The –Mckpt and –mckpt options modify checkpointing environments.
The –Mp and –mp options modify parallel environments.
The difference between the uppercase –M options and the lowercase –m options controls the qconf command's result. Both –M and –m mean modify, but the uppercase –M denotes modification from an existing file, whereas the lowercase –m does not. Instead, the lowercase –m opens a temporary file in an editor. When you save any changes you make to this file and exit the editor, the system immediately reflects those changes.
However, when you want to change many objects at once, or you want to change object configuration noninteractively, use the qconf command with the options that modify object attributes (such as –Aattr, –Mattr, and so forth).
The following commands make modifications according to specifications in a file:
qconf -Aattr {queue | exechost | pe | ckpt} filename qconf -Mattr {queue | exechost | pe | ckpt} filename qconf -Rattr {queue | exechost | pe | ckpt} filename qconf -Dattr {queue | exechost | pe | ckpt} filename |
The following commands make modifications according to specifications on the command line:
qconf -aattr {queue | exechost | pe | ckpt} attribute value {queue-list | host-list} qconf -mattr {queue | exechost | pe | ckpt} attribute value {queue-list | host-list} qconf -rattr {queue | exechost | pe | ckpt} attribute value {queue-list | host-list} qconf -dattr {queue | exechost | pe | ckpt} attribute value {queue-list | host-list} |
The –Aattr and –aattr options add attributes.
The –Mattr and –mattr options modify attributes.
The –Rattr and –rattr options replace attributes.
The –Dattr and –dattr options delete attributes.
filename is the name of a file that contains attribute-value pairs.
attribute is the queue or host attribute that you want to change.
value is the value of the attribute you want to change.
The –aattr, –mattr, and –dattr options enable you to operate on individual values in a list of values. The –rattr option replaces the entire list of values with the new one that you specify, either on the command line or in the file.
The following command changes the queue type of tcf27–e019.q to batch only:
% qconf -rattr queue qtype batch tcf27-e019.q |
The following command uses the file new.cfg to modify the queue type and the shell start behavior of tcf27–e019.q:
% cat new.cfg qtype batch interactive checkpointing shell_start_mode unix_behavior % qconf -Rattr queue new.cfg tcf27-e019.q |
The following command adds the resource attribute scratch1 with a value of 1000M and the resource attribute long with a value of 2:
% qconf -rattr exechost complex_values scratch1=1000M,long=2 tcf27-e019 |
The following command attaches the resource attribute short to the host with a value of 4:
% qconf -aattr exechost complex_values short=4 tcf27-e019 |
The following command changes the value of scratch1 to 500M, leaving other values unchanged:
% qconf -mattr exechost complex_values scratch-=500M tcf27-e019 |
The following command deletes the resource attribute long:
% qconf -dattr exechost complex_values long tcf27-e019 |
The following command adds tcf27–b011.q to the list of queues for the checkpointing environment sph:
% qconf -aattr ckpt queue_list tcf27-b011.q sph |
The following command changes the number of slots in the parallel environment make to 50:
% qconf -mattr pe slots 50 make |
The qselect command outputs a list of queue instances. If you specify options, qselect lists only the queue instances that match the criteria you specify. You can use qselect in combination with the qconf command to target specific queue instances that you want to modify.
The following command lists all queue instances on Linux machines:
% qselect -l arch=glinux |
The following command lists all queue instances on machines with two CPUs:
% qselect -l num_proc=2 |
The following command lists all queue instances on all four-CPU 64–bit Solaris machines:
% qselect -l arch=solaris64,num_proc=4 |
The following command lists queue instances that provide an application license. The queue instances were previously configured.
% qselect -l app_lic=TRUE |
You can combine qselect with qconf to do wide-reaching changes with a single command line. To do this, put the entire qselect command inside backward quotation marks (` `) and use it in place of the queue-list variable on the qconf command line.
The following command sets the prolog script to sol_prolog.sh on all queue instances on Solaris machines:
% qconf -mattr queue prolog /usr/local/scripts/sol_prolog.sh `qselect -l arch=solaris` |
The following command sets the attribute fluent_license to two on all queue instances on two-processor systems:
% qconf -mattr queue complex_values fluent_license=2 `qselect -l num_proc=2` |
The most flexible way to automate the configuration of queue instances is to use the qconf command with the qselect command. With the combination of these commands, you can build up your own custom administration scripts.