[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

lb_admin Command

Purpose

Administers the registration of NCS-based servers in location broker databases.

Syntax

lb_admin [ -nq ] [ -version ]

Description

The lb_admin tool administers the registrations of NCS-based servers in global location 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. The lb_admin tool can be used to look up information, add new entries, and delete existing entries in a specified database.

The lb_admin tool is useful for inspecting the contents of location broker databases and for correcting database errors. For example, if a server terminates abnormally without unregistering itself, use lb_admin to manually remove its entry from the GLB database.

When 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 format

xxxxxxxxxxxx.xx.xx.xx.xx.xx.xx.xx.xx

where each x is a hexadecimal digit. Descriptive textual names are associated with UUIDs in the uuidname.txt file.

lb_admin will examine or modify only one database at a time. This is 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 GLB or LLB database is to be accessed. Of course, if one replica of a replicated GLB database is modified, the modifications will be propagated to the other replicas of that database.

Flags

-nq Do not query for verification of wildcard expansions in unregister operations.
-version Display the version of NCS that this lb_admin belongs to, but do not start the tool.

Subcommands

In lookup, register, and unregister commands, the object, type, and interface arguments can be either character strings representing UUIDs or textual names corresponding to UUIDs, as described earlier.

a[dd] Synonym for register.
c[lean] Finds and deletes obsolete entries in the current database. When issuing this command, lb_admin attempts to contact each server registered in the database. If the server responds, the entry for its registration is left intact 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 the result of this lookup, and asks if the entry is to be deleted. If a server responds, but its UUIDs do not match the entry in the database, lb_admin tells this result and asks if the entry is to be deleted.

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, but the server is not registered with that LLB. The server is probably no longer running.
  • 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.

In other situations, it is best not to delete the entry unless it can be verified directly that the server is not running (for example, by listing the processes running on its host).

When lb_admin asks to delete an entry, there are four ways to respond. A y[es] response deletes the entry. A n[o] response leaves the entry intact in the database. After a yes or a no, lb_admin proceeds to check the next entry in the current database. A g[o] response invokes automatic deletion, in which all eligible entries are deleted and all ineligible entries are left intact, without the user being queried, until all entries have been checked. A q[uit] response terminates the clean operation.

d[elete] Synonym for unregister.
h[elp] [Command] or ? [Command]
                          Displays a description of the specified Command or, if none is specified, list all of the lb_admin commands.
l[ookup] Object Type Interface Looks up and displays all entries with matching Object, Type, and Interface fields in the current database. An asterisk can be used as a wildcard for any of the arguments. If all the arguments are wildcards, lookup displays the entire database.
q[uit] Exits the lb_admin session.
r[egister] Object Type Interface Location Annotation [Flag]
                          Adds the specified entry to the current database. Use an asterisk to represent the nil UUID in the Object, Type, and Interface fields.

The location 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. Possible values for Family include ip. A leading # can be used 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 acceptable location specifiers.

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 GLB databases. The Flag is a field that is stored with the entry but does not affect where the entry is registered. The set_broker and use_broker commands select the particular LLB or GLB database for registration.

s[et_broker] [BrokerSwitch] Host
                          Sets the host for the current LLB or GLB. If specifing global as the BrokerSwitch, set_broker sets the current GLB; otherwise, it sets the current LLB. The host is a string in the format Family:Host, where Family is an address family and Host is a host name. Possible values for Family include ip. A leading # can be used to indicate that a host name is in the standard numeric form. For example, ip:prague and ip:#192.5.5.5 are acceptable host specifiers.

Issue use_broker, not this command, to determine if subsequent operations will access the LLB or the GLB.

set_t[imeout] [short | long]
                          Sets 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
                          Deletes the specified entry from the current database.

The location 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. Possible values for Family include ip. A leading # can be used 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 acceptable location specifiers.

An asterisk can be used as a wildcard in the Object, Type, And Interface fields to match any value for the field. Unless queries have been suppressed by invoking lb_admin with the -nq option, unregister allows deletion of each matching entry. A y[es] response deletes the entry. A n[o] response leaves the entry in the database. A g[o] response deletes all remaining database entries that match, without querying. A q[uit] response terminates the unregister operation, without deleting any additional entries.

us[e_broker] [BrokerSwitch]
                          Selects the type of database that subsequent operations will access, GLB or LLB. The BrokerSwitch is either global or local. If a BrokerSwitch is not supplied, use_broker determines if the current database is global or local.

Use set_broker to select the host whose GLB or LLB is to be accessed.

Related Information

The drm_admin (NCS) command

The glbd (NCS) daemon, llbd (NCS) daemon, nrglbd (NCS) daemon.


[ Previous | Next | Contents | Glossary | Home | Search ]