Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

To start the automatic backup process, type the following command on the sge_qmaster host:

inst_sge -bup -auto backup-conf

backup-conf is the full path to the backup configuration file.


Note - You do not need to shut down any of the grid engine system daemons before you back up your configuration files.


Your backup is created in the directory specified by BACKUP_FILE. A backup log file called install.pid is also created in this directory. pid is the process ID number.

Using Files and Scripts for Administration Tasks

This section describes how to use files and scripts to add or modify grid engine system objects such as queues, hosts, and environments.

You can use the QMON graphical user interface to perform all administrative tasks in the grid engine system. You can also administer a grid engine system through commands you type at a shell prompt and call from within shell scripts. Many experienced administrators find that using files and scripts is a more flexible, quicker, and more powerful way to change settings.

Using Files to Add or Modify Objects

Use the qconf command with the following options to add objects according to specifications you create in a file:

qconf -Ae
qconf -Aq
qconf -Au
qconf -Ackpt
qconf -Ap

Use the qconf command with the following options to modify objects according to specifications you create in a file:

qconf -Me
qconf -Mq
qconf -Mu
qconf -Mckpt
qconf -Mp

The -Ae and -Me options add or modify execution hosts.

The -Aq and -Mq options add or modify queues.

The -Au and -Mu options add or modify usersets.

The -Ackpt and -Mckpt options add or modify checkpointing environments.

The -Ap and -Mp options add or modify parallel environments.

Use these options in combination with the qconf -s command to take an existing object and modify it. You can then update the existing object or create a new object.

Example 7-1 Modifying the Migration Command of a Checkpoint Environment

#!/bin/sh
# ckptmod.sh: modify the migration command
# of a checkpointing environment
# Usage: ckptmod.sh <checkpoint-env-name> <full-path-to-command>
TMPFILE=tmp/ckptmod.$$

CKPT=$1
MIGMETHOD=$2

qconf -sckpt $CKPT | grep -v '^migr_command' > $TMPFILE
echo "migr_command $MIGMETHOD" >> $TMPFILE
qconf -Mckpt $TMPFILE
rm $TMPFILE

Using Files to Modify Queues, Hosts, and Environments

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.

Example 7-2 Changing the Queue Type

The following command changes the queue type of tcf27-e019.q to batch only:

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

Example 7-3 Modifying the Queue Type and the Shell Start Behavior

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

Example 7-4 Adding Resource Attributes

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

Example 7-5 Attaching a Resource Attribute to a Host

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

Example 7-6 Changing a Resource Value

The following command changes the value of scratch1 to 500M, leaving other values unchanged:

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

Example 7-7 Deleting a Resource Attribute

Previous Previous     Contents     Index     Next Next