man8/DMANsetconfig_v2

Table of Contents

Name

DMANsetconfig_v2 - tell DMANserv_v2 to load a configuration file.

Synopsis

DMANsetconfig_v2 [dman_host] [operation] [file]

Description

This program tells DMANserv_v2(8) to load or save a CONFIG_TBL (commonly known as a dmngr_config table).

Several operations are supported. See the explanations below for more information.

Arguments

Parsing of the arguments is simple minded.

The arguments marked required must be supplied.

Arguments marked optional are not required. However, if an optional argument is used the arguments preceeding it on the command line must be supplied (even if they are marked optional).

dman_host - required

the host where DMANserv_v2(8) is running
operation - required

the operation to perform.

Valid operations are: sload, sload_sav, load_def, load_sav, and save_sav.

See the section Operation of various commands below for an explanation of the various operations.

file - optional

The name of the config file to load.

See the section Operation of various commands below for an explanation of the role of the <file> argument in various operations.

Operation of various commands

The descriptions below refer to the "default file name". The default file name is dmngr_config_v2.

sload

Issue a command to DMANserv_v2(8) to load the default configuration file.

If the <file> arg is not provided the current working directory is used and concatenated with the default file name.

If the <file> arg is provided and is an absolute pathname, i.e. it starts with a "/", then the <file> arg as provided is used as the file and path name to store the configuration.

If the <file> arg is provided and is not an absolute pathname, i.e. it doesn’t start with a "/", then the current working directory and the <file> arg are concatenated together to form the file and path name.

This or the sload_sav operation should be the first dmngr_config load command issued to DMANserv after startup. These are very important commands because they set the pathname to the directory which will be used for save operations issued from this program or from DMANmngr.

When DMANserv_v2(8) receives this command it checks to see if this is the first time a configuration has been loaded. If so then the load is allowed.

If not then DMANserv_v2(8) checks to see if this is the same file which was loaded previously. If so the file is loaded.

If it is a different file then a check is made to see if a runlist is in progress. If a runlist is in progress the load is rejected and an error message is written back to the user otherwise the file is loaded.

sload_sav

Issue a command to DMANserv_v2(8) to load a configuration file.

The same rules described for the sload command with regard to filenames, pathnames and DMANserv’s load rules also apply here.

The difference is that DMANserv_v2(8) will first look for a ".sav" file by appending ".sav" to the file/path name provided by this program. If found the ".sav" file will be loaded.

Otherwise the default will be loaded as described above for the sload command.

load_def

Issue a command to DMANserv_v2(8) to reload the default configuration file.

This causes DMANserv_v2(8) to load the default configuration file using the pathname to the file previously established by an sload or sload_sav operation.

In this case the filename argument is ignored.

If an sload or sload_sav operation has not been performed this operation is rejected.

This command can also be issued from DMANmngr_v2(1) .

load_sav

Issue a command to DMANserv_v2(8) to load the ".sav" configuration file using the pathname to the file previously established by an sload or sload_sav operation.

In this case the filename argument is ignored.

If an sload or sload_sav operation has not been performed this operation is rejected.

This command can also be issued from DMANmngr_v2(1) .

save_sav

Issue a command to DMANserv_v2(8) to save the dmngr_config file.

If the <file> arg is not provided the ".sav" file is written into the directory previously established by an sload or sload_sav operation.

If an sload or sload_sav operation has not been performed (and no filename is provided) the operation is rejected.

If the <file> arg is provided and is a relative pathname then the current working directory is used.

If the <file> arg is provided and is an absolute pathname then the file is written into the provided pathname.

In all cases if the ".sav" file already exists it is overwritten.

This command (without a filename) can also be issued from DMANmngr_v2(1) . This causes the .sav to be written into the species directory i.e. the directory established by a previous sload or sload_sav operation.

Examples

The examples below all use the following pathname:

/AccelNET/demo/ams_setup/carbon

Usually the standard AccelNET environment variables are used:

USER_TREE=/AccelNET
CONF=demo

Many times a "species" is also involved. Here we will show this as an environment variable, the set_species script may do it differently.

SPECIES=carbon

The hostname where DMANserv_v2(8) is running is the first argument to the program. Usually this is also a standard AccelNET environment variable.

DMAN_HOST=localhost

sload operation

This loads the default config file.

#
CF=$USER_TREE/$CONF/ams_setup/$SPECIES
DMANsetconfig_v2 $DMAN_HOST sload $CF/dmngr_config_v2
#

For those who may not understand UNIX shell semantics "$CF/dmngr_config_v2" resolves to:

/AccelNET/demo/ams_setup/carbon/dmngr_config_v2

sload_sav operation

This loads the .sav or the default config file. This is the operation set_species should normally use.

#
CF=$USER_TREE/$CONF/ams_setup/$SPECIES
DMANsetconfig_v2 localhost sload_sav $CF/dmngr_config_v2
#

load_def operation

This reloads the default config file.

#
CF=$USER_TREE/$CONF/ams_setup/$SPECIES
DMANsetconfig_v2 $DMAN_HOST load_def
#

load_sav operation

This reloads the ".sav" config file.

#
CF=$USER_TREE/$CONF/ams_setup/$SPECIES
DMANsetconfig_v2 $DMAN_HOST load_sav
#

save_sav operation

This saves the ".sav" config file.

#
CF=$USER_TREE/$CONF/ams_setup/$SPECIES
DMANsetconfig_v2 $DMAN_HOST save_sav
#

Notes

See the white paper "dman_config_edit" for more information.

This program is deprecated. Use DMANcontrol_v2(8) instead.

Manual Page Revision

$Id: DMANsetconfig_v2.8,v 2.4 2007/08/06 12:38:22 kitchen Exp $


Table of Contents