2.7 General functions about the state of the system

legion_classof 
     {[-c] <object context name> | -l <object LOID>} 
     [-debug] [-help]

Displays the LOID of the class of the object named in <context path> or <object LOID>. The example below displays instance Foo's class LOID.

$ legion_classof Foo
The class of 1.01.66000000.01000000.000001fc0...
is 1.01.66000000..000001fc0d085b2c33...
$

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_create_stat_tree 
     <base context path> [-debug] [-help]

Creates a database of current loads on all host objects in a system.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_get_accounting_data
     [-v] [-help] [-debug]
     {<pull-source1> <pull-source2> ... <pull-sourcen>}
     {-d <local target directory>} 
     [-ot <seconds>] [-it <seconds>]

This command retrieves accounting information logs from one or more specified pull-sources and places them in the specified target directory in your local file space. A pull-source can be an individual host, a list of hosts, a class of hosts, or a Unix file containing a list of Legion hosts. Each host is queried for its log of process/job accounting information.

The host object(s)'s current status is also retrieved and placed in the target directory as a log file. If all the requested accounting information is successfully gathered, the queried hosts are instructed to trim their logs.

You must include the following parameters.

<pull-source1> <pull-source2> ... <pull-sourcen>

One or more hosts that should be queried for account information. A pull-source can be one of the following:

-c <host context path>
-l <host LOID>
-Class <host class context name>
-ClassLoid <host class LOID>
-Context <context containing a group of hosts>
-File <local Unix file>

If you use the -File flag, the specified file must contain a list of Legion host context paths or LOIDs.

-d <target directory>

A local directory that will contain the accounting logs.

The following options are supported.

-v

Run command in verbose mode. This will return information about which log requests are currently being processed.

-help

Print command syntax and exit.

-debug

Catch and print Legion exceptions.

-ot <seconds>

Outcall timeout in seconds (default is 60 seconds).

-it <seconds>

Incall timeout in seconds (default is 60 seconds).

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

Prints the number of objects and current load for the given host object. The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

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

Lists the Legion objects currently managed by (i.e., running on) the host object named in <host context path> or <host LOID>. This may include each object's LOID, status, and its owner's LOID and OA.

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_update_accounting_db
[-v] <local configuration file path> <local logfile directory>

Parse the data in all accounting information logs in a specified local directory and place the data into a MySQL database. This tool requires the following system configurations in order to run properly:

  • Linux/Unix variant operating system
  • Perl version 5.005_05 or higher
  • Access to a MySQL database whose scheme has been configured for Legion accounting information
  • Msql-Mysql-modules and Data-Dumper Perl modules installed

The tool may attempt to perform reverse context lookups on object LOIDs in order to determine human readable identifiers (i.e., context paths). For suitable results, we suggest that you only run this command if you are logged in as /users/admin.

You must include the following parameters.

<local configuration file path>

A local text file that contains database configuration information in this format:

[client]
host=
database=
user=
password=
<local logfile directory>

A local directory that contains accounting information logs.

The following option is supported.

-v

Run in verbose mode. Print information about which log requests the command is currently working on.

legion_update_stat_tree 
     [-v] [-help] [-t <repeat delay seconds>]
[-site <top site context path>]
[-collection <collection context path>]

Updates a database of current loads on all host objects in a system. You can set the command to run at regular intervals.

The following options are supported:

-v

Verbose mode.

-help

Print this help message and exit.

-t

Specify that the command should operate in continuous mode, continually updating the stat tree every <repeat delay seconds> seconds. Use Ctrl-C to quit out of continuous mode.

-site <site context path>

Specify the top-level context to update. The default starting point is /sites.

-collection <collection context path>

Specify a collection to satisfy host information requests. The default is /etc/DefaultCollection.

legion_version 
     [-debug] [-help]

Prints your Legion version number. For example, the output below indicates that the current system is University of Virginia Legion version 1.5.9.

$ legion_version
VaL Legion version 1.5.9
$

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.


legion_wellknown_class 
     <wellknown class name> 
     [-debug] [-help]

Gets the class LOID of a Legion "well-known" class. Possible values for <wellknown class> are:

  • LegionClass
  • BootstrapMetaClass
  • UnixHostClass
  • UnixVaultClass
  • CommandLineClass
  • ContextClass
  • ImplementationClass
  • UnixImplementationCacheClass
  • BindingAgentClass

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_whereis 
     {[-c] <object context name> | -l <object LOID>} 
     [-debug] [-help]

This command returns a specified object's host and vault object. That is, the output gives the context path of the host and vault objects where the object and the object's persistent state are located. If the host or vault objects have been assigned aliases Legion will randomly return one of the context paths. Your output will look something like this:

$ legion_whereis Foo
Host: /hosts/BootstrapHost
Vault: /vaults/BootstrapVault
$

This example looks up the location of object Foo. The output shows that the object is located on BootstrapHost and its persistent state is on BootstrapVault. The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

legion_whoami 
     [-debug] [-help]

You can use this command to find out which user id you are currently logged in with. For example, if you log in as user nemo, your output will be:

$ legion_whoami
/users/nemo
$

The following options are supported:

-debug

Catch and print Legion exceptions.

-help

Print command syntax and exit.

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

Free JavaScripts provided by The JavaScript Source

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