2.5 Start-up and shutdown functions

legion_add_host_account
     {-l <host object LOID> | [-c] <host object context path>}
     {[-f <mapping file name>] | [<Unix user id> 
      [-l <owner LOID> | -c <owner context path>]]}
     [-debug] [-help]

This command is used on PCD host objects. Adds a mapping between a Legion account and a Unix account and adds this mapping to a PCD host object's list of available accounts. The user's Unix user id is named in the <Unix user id> parameter. The host object is named in the <host object LOID>/<host object context path> parameter. The user's Legion user id can be given in the <owner LOID>/<owner context path> parameter or listed in the mapping file.

The following options are supported:

-f <mapping file name>

Names a mapping file. The mapping file contains a list of Unix user id-Legion user name mappings for that PCD host object. There is no limit on the number of mappings that can be listed. One mapping per line. If a Unix id is listed but not mapped to a Legion user id, the account will be a guest account.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

There are two ways to add host accounts: directly from the command line or, via the -f flag, with a mapping file. A mapping file contains a list of Unix-Legion account mappings. This file contains a list of Unix user ids and any corresponding Legion user ids. If no Legion account is named, the account will be treated as a guest account. There is no limit on the number of mappings that can be listed. A sample mapping file is below.

guest	
unixLucy	-c /users/lucy
unixJohn	-c /users/john
legion_create_class 
     [[-c] <context path>] [-sc <scheduler context path>] 
     [-sl <scheduler LOID>] [-debug] [-help]

Creates a new instance of class VanillaMetaClass. The object will be placed in the current working context, unless specified with the -c flag. The following options are supported:

[-c] <context path>

Assigns the context name in <contex path> to the new instance.

-sc <scheduler context path>

Specify the context path of the default scheduler object that the new class should use.

-sl <scheduler LOID>

Specify the LOID of the default scheduler object that the new class should use.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_destroy_host 
     [-v] {[-c] <host context path> | -l <host LOID>} [-debug] [-help]

Destroy a given host object. All contexts objects on that host will be destroyed and all active objects will be deactivated. Legion will automatically search your context space and remove any dangling context names for the host object.

Optional parameters do the following:

-v

Run in verbose mode.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_destroy_vault 
     {[-c] <vault context path> | -l <vault LOID>} [-debug] [-help]

Destroy a given vault object. Legion will attempt to move all of the vault's current OPRs off of the vault object and then destroy the vault object. If any OPRs cannot be successfully moved the process will abort and an error message will be displayed.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_initialize
     [-debug] [-help]

Populates the Legion system with basic classes and implementations. This command should be run after a Legion system is started for the first time (using legion_startup). On subsequent activations of the system, the state created by this utility will already exist, so this command should not be run again.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_list_host_accounts
     {-l <host object LOID> | [-c] <host object context path>}
     <user id> [-debug] [-help]

This command is used on PCD host objects. It lists the available accounts on a host object. If no host object argument is provided, your current host object will be used as a default.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_make_setup_script 
     [-o <script basename>] [-OPR <OPR dir name>] 
     [-L <$LEGION dir name>] [-debug] [-help]

Generates a Legion setup script for your system. This script sets the environment variables for Legion users. The following options are supported:

-o <script basename>

Specify the basename for the resulting setup scripts (default is /home/xxxx/ OPR/setup). This command will generate two setup scripts, one for /bin/sh derivative users and one for csh-derivative users. The scripts will be named <script basename>.sh and <script base-name>.csh, respectively.

-OPR <OPR dir name>

Specify the OPR directory name that will be set up when the resulting scripts are run. This directory will contain the user's local copy of Legion-Class.config (default is "Legion-OPR"). The user's local version of the directory will be placed in the user's $HOME.

-L <$LEGION dir name>

Specify the value of $LEGION, which is the directory where the resulting scripts are run. The default is the current value of $LEGION.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_print_config
     [-debug] [-help]

Prints the "well-known" binding for LegionClass in the current Legion configuration. The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_remove_host_account
     [-l <host object LOID> | [-c] <host object context path>]
     [-debug] [-help]

This command is used on PCD host objects. It removes one or more account mappings from the host object's list of available accounts. The <user id> parameter is the user's Unix user id. If no host is named in the <host object LOID>/<host object context path> parameter, your current host object will be the default host.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_setup_state 
     [-i] [-debug] [-help]

Creates OPRs for the basic Legion system objects. This script should be run when starting a Legion system for the first time. The following optional parameters are supported:

-i

Run the command in an interactive mode.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_shutdown 
     [-local] [-f] [-i] [-debug] [-help]

Shuts down a running Legion system, preserving the state of all objects for subsequent reactivation of the system. Optional parameters allow users to shut down individual hosts and to specify an interactive shutdown.

Optional parameters do the following:

-local

Shut down only a local host or vault.

-f

Force the termination of a system. This may leave processes running, however, and prevent a system restart.

-i

Put the shutdown in an interactive mode, which provides prompts for user actions.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_shutdown_class 
     {[-c] <class context name> | -l <class LOID>} [-debug] [-help]

Deactivates the class object named in <class LOID> or <context path> and all of its instances. This command operates recursively: if applied to a metaclass, for example, it would deactivate the metaclass, all of its class instances, all of their instances, etc.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_starthost 
     [-L <$LEGION>] [-O <$LEGION_OPR>] [-A <$LEGION_ARCH>] 
     [-B <path>] [-N <context name>] [-U <user id>] [-C <host class>]
     <new host name> [<compatible vault list>] 
     [-debug] [-help]

Creates a new host object on the specified <new host name>, using the legion_create_object_r command (automatically invoked on the host class). The <new host name> is the host's DNS name. The legion_starthost command selects the following default values for the new object:

<$LEGION_OPA> = $LEGION_OPR/Host-$HOST.OPA
<binary path> = $LEGION/bin/$LEGION_ARCH/UnixHostObject

This command uses remote shell (rsh or ssh) classes to start a new host object on a specified host. Please note that you must be able to run rsh/ssh on the target host from your current machine without having to enter a password. You can set up an .rhosts file for rsh or an authorized_keys file for ssh to accomplish this: see the rsh and ssh man pages for further information.

You can run Legion commands on a remote host using rsh or ssh, once you set the proper environment variables. For sh, ksh, or bash, use:

LEGION_RSH=<rsh|ssh>
LEGION_RCP=<rcp|scp>
export LEGION_RSH LEGION_RCP

For csh, use:

setenv LEGION_RSH <rsh|ssh>
setenv LEGION_RCP <rcp|scp>

Optional parameters do the following:

-L <$LEGION>

Specify $LEGION for host (default is "/home/Legion").

-O <$LEGION_OPR>

Specify $LEGION_OPR for host (default is current $LEGION_OPR).

-A <$LEGION_ARCH>

Specify the architecture type for the host (default is current $LEGION_ARCH).

-B <path>

Specifies the basename of the executable host program that will be started on the target host (default is "UnixHostObject").

-N <context name>

Specify the context name for the host object (default is /hosts/<host name>).

-U <user id>

Specify the user id for host (default is current user id).

-C <host class>

Specify the context path of the host class to use (default is /class/UnixHostClass).

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_startup 
     [-local] [-debug] [-help]

Starts up basic Legion services. The following optional parameters are supported:

-local

Starts up only a local host or vault.

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_startvault 
     [-L <$LEGION>] [-O <$LEGION_OPR>] [-A <$LEGION_ARCH>] 
     [-N <context name>] [-U <user id>] [-C <vault class>]
     <host name> [<compatible host list>] 
     [-debug] [-help]

Creates a new vault object on the specified <host name>, using the legion_create_object_r command (automatically invoked on the host class) (page 13). The <host name> is the host's DNS name.

This command uses remote shell (rsh or ssh) classes to start a new vault object on a specified host. Please note that you must be able to run rsh/ssh on the target host from your current machine without having to enter a password. You can set up an .rhosts file for rsh or an authorized_keys file for ssh to accomplish this: see the rsh and ssh man pages for further information.

You can run Legion commands on a remote host using rsh or ssh, once you set the proper environment variables. For sh, ksh, or bash, use:

LEGION_RSH=<rsh|ssh>
LEGION_RCP=<rcp|scp>
export LEGION_RSH LEGION_RCP

For csh, use:

setenv LEGION_RSH <rsh|ssh>
setenv LEGION_RCP <rcp|scp>

The following optional parameters are supported:

-L <$LEGION>

Specify $LEGION for the vaults host. Default is "/home/Legion".

-O <$LEGION_OPR>

Specify $LEGION_OPR for the vaults host. Default is "/home/OPR".

-A <$LEGION_ARCH>

Specify the architecture of the vaults host. Default is current $LEGION_ARCH.

-N <context name>

Specify the context name for the vault object. Default is /vaults/vault-<host name>.

-U <user id>

Specify the user id to use on the vaults host. Default is current user id.

-C <vault class>

Specify the vault object's context path (default is /class/UnixVaultClass)

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

Directory of Legion 1.6.4 Manuals
[Home] [General] [Documentation] [Software]
[Testbeds] [Et Cetera] [Map/Search]

Free JavaScripts provided by The JavaScript Source

legion@Virginia.edu
http://legion.virginia.edu/