Sun N1 Grid Engine 6.1 Administration Guide

Targeting Queue Instances with the qselect Command

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.


Example 8–10 Listing Queues

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.


Example 8–11 Using qselect in qconf Commands

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.