lb_admin(1ncs)
Name
lb_admin − Location Broker Administrative Tool
Syntax
/etc/ncs/lb_admin [ −version ] [ −nq]
Description
The lb_admin tool monitors and administers the registrations of DECrpc-based servers in Global Local Broker (GLB) or Local Location Broker (LLB) databases. A server registers Universal Unique Identifiers (UUIDs) specifying an object, a type, and an interface, along with a socket address specifying its location. A client can locate servers by issuing lookup requests to GLBs and LLBs.
In accepting input or displaying output, lb_admin uses either character strings or descriptive textual names to identify objects, types, and interfaces. A character string directly represents the data in a UUID in the following format: nnnnnnnnnnnn.nn.nn.nn.nn.nn.nn.nn.nn where each n is a hexadecimal digit.
With lb_admin, you examine or modify only one database at a time, referred to as the current database. The use_broker command selects the type of Location Broker database, GLB or LLB. The set_broker command selects the host whose LLB database is to be accessed.
Information about individual command interfaces is available through the help command.
Options
−nq Do not query for verification of wildcard expansions in unregister operations.
−version Display the version of the Network Computing Kernel (NCK) that this lb_admin belongs to, but do not start the tool. (NCK is part of the Network Computing System (NCS) on which DECrpc is based.)
Commands
In the descriptions of lookup, register, and unregister, the object, type, and interface arguments can be either character strings representing UUIDs or textual names corresponding to UUIDs, as described earlier.
In the descriptions of register and unregister, the location argument is a string in the format family:host[port], where family is an address family, host is a host name, and port is a port number. The only value for family is ip. You can use a leading number sign (#) to indicate that a host name is in the standard numeric form. For example, ip:vienna[1756], and ip:#192.5.5.5[1791] are both acceptable location specifiers.
a[dd] Synonym for register.
c[lean] Find and delete obsolete entries in the current database.
When you issue the clean command, lb_admin attempts to contact each server registered in the database. If the server does not respond, lb_admin tries to look up its registration in the LLB database at the host where the server is located, tells you the result of this lookup, and asks whether you want to delete the entry. If a server responds, but its UUIDs do not match the entry in the database, lb_admin tells you this result and asks whether you want to delete the entry, even if you used the -nq option to lb_admin.
There are two situations in which it is likely that a database entry should be deleted:
•The server does not respond, lb_admin succeeds in contacting the LLB at the host where the server is located, and the server is not registered with that LLB. The server is probably no longer running.
•A server responds, but its UUIDs do not match the entry in the database. The server that responded is not the one that registered the entry.
Entries that meet either of these conditions are probably safe to delete and are considered eligible for automatic deletion (described in the next paragraph). In other situations, it is best not to delete the entry unless you can verify directly that the server is not running (for example, by listing the processes running on its host).
When the clean command asks whether you want to delete an entry, choose one of the following responses:
y[es] Delete the entry.
n[o] Leave the entry intact in the current database.
g[o] Invoke automatic deletion, in which all eligible entries (see the previous paragraph) are deleted and all ineligible entries are left intact, without your being queried, until all entries have been checked.
q[uit]
Terminate the clean operation.
d[elete] Synonym for unregister.
h[elp] [command] or ? [command]
Display a description of the specified command or, if none is specified, list all of the lb_admin commands.
l[ookup] object type interface
Look up and display all entries with matching object, type, and interface fields in the current database. Use the letter l to list all of the entries in the database. You can use asterisks as wildcards for any of the arguments. If all the arguments are wildcards, or if no arguments are given, lookup displays the entire database.
q[uit] Exit the lb_admin session.
r[egister] object type interface location annotation [flag]
Add the specified entry to the current database. You can use an asterisk to represent the nil UUID in the object, type, and interface fields.
The annotation is a string of up to 64 characters annotating the entry. Use double quotation marks (" ") to delimit a string that contains a space or contains no characters. To embed a double quotation mark in the string, precede it with a backslash (\).
The flag is either local (the default) or global, indicating whether the entry should be marked for local registration only or for registration in both the LLB and the GLB databases. The flag is a field that is stored with the entry; it does not affect where the entry is registered. The set_broker and use_broker commands select the particular LLB or GLB database for registration.
set_broker [broker_switch] location
Set the host for the current LLB or GLB. If you specify global as the broker_switch, set_broker sets the current GLB; otherwise, it sets the current LLB. The host is a location specifier as described earlier, but the [port] portion is ignored and can be omitted.
Issue the use_broker command, not the set_broker command, to determine whether subsequent operations will access the LLB or the GLB.
set_t[imeout] [short | long]
Set the timeout period used by lb_admin for all of its operations. With an argument of short or long, set_timeout sets the timeout accordingly. With no argument, it displays the current timeout value.
u[nregister] object type interface location
Delete the specified entry from the current database.
You can use an asterisk as a wildcard in the object, type, and interface fields to match any value for the field. Unless you suppress queries by specifying the -nq option of lb_admin, unregister asks you whether to delete each matching entry. Choose one of the following responses:
y[es] Delete the entry.
n[o] Leave the entry in the database.
g[o] Delete all remaining database entries that match, without your being queried.
q[uit]
Terminate the unregister operation, without deleting any more entries.
us[e_broker] [broker_switch]
Select the type of database that subsequent operations will access, GLB or LLB. The broker_switch is either global or local. If you do not supply a broker_switch, use_broker tells whether the current database is global or local.
Use set_broker to select the host whose GLB or LLB is to be accessed.
See Also
llbd(8ncs), nrglbd(8ncs)
Guide to the Location Broker