Tornado Reference : Tornado Tools
wtxregd - the Tornado service registry
wtxregd [-d.irectory registryDirectory] [-h.elp] [-pd pingDelay] [-pn pingNumbers] [-use_portmapper] [-V.erbose] [-v.ersion]
This daemon is a service registry that maintains a database of target servers, boards or any other item identifiers (see tgtsvr) and RPC port numbers.
Target-server identifiers are unique, and they are based on the name of the target board (or an explicit alternate name supplied when the target server is launched) and the name of the host where the target server runs. The two names are linked with the character @, for example, targetName@serverHost.
This registry allows the Tornado tools to establish a connection with the target servers.
After accidental shutdown of the registry, recovery is done based on the data saved in wtxregd.hostName. The data base file default directory is $WIND_BASE/.wind and can be specified through the -d[irectory] option.
On UNIX hosts, it is advisable to include the daemon in the rc.local file of the host where it runs for UNIX users, so that it starts and restores database automatically after a reboot.
On Windows hosts the Tornado registry can also be used through the wtxregd daemon. Tornado installation adds it to your Automatic Startup if specified, or you can add the command line to the Start->Programs->Startup utilities.
Windows NT users can add the wtxregds service to the startup services. This addition to the Windows registry is done while installing Tornado.
The Tornado registry service does not accept any command line options; it starts with the registry default options.
Note that, if you install the Tornado registry as a service (on Windows NT), you will not be able to use Tornado 1.0.1 tools with your Tornado 2.0 installation. For more information, see Tornado Getting Started: Installing Tornado.
The registry daemon automatically detects target servers that are not responding. It dynamically removes target servers that are presumed dead from the registry queue. This self-managing feature prevents you from having to manually unregister target servers that are not responding (see TARGET SERVERS PING section for further informations).
Tornado tools need to know the host on which the registry daemon runs. The host name of this machine or its IP address is published through the environment variable WIND_REGISTRY.
After an registry shutdown, a recovery of the data base is done from the data base backup file whose location has been specified by the -d option. (The default location is $WIND_BASE/.wind.)
If the target servers registered on the same host as the registry are not responding at restoration time, they will be removed from the registry queue.
While processing a wtxToolAttach( ) on a target server, the registry pings this target server. If the ping is unsuccessfull (after 3 seconds of pending ping), the target server is considered to be not responding.
While processing a wtxInfoQ( ), the target servers that are not responding are pinged if the pingDelay has expired (see PING DELAY section).
A not responding target server will be unregistered (and then considered to be dead) if it has been unsuccessfully pinged at least pingNnumbers times AND if the time between the first and last unsuccessfull ping time is at least equal to pingDelay*pingNnumbers. This is to avoid having a single failed ping lead to an unregistered target server.
This mechanism is used to allow the Tornado tools to survive network latencies or short time failures.
This delay (in seconds) can be specified through the -pd option, and its default value is set to 120. It specifies after how many seconds a target server that does not respond should be pinged again.
In compination with the -pn option (see PING NUMBER section), this value sets the time after which a target server that does not respond is considered dead.
See the EXAMPLE section for examples on how to use the -pd option.
This number, set by the -pn option, fixes the number of times a target server that does not respond has to be unsuccessfully pinged to be considered dead.
See the EXAMPLE section for examples on how to use the -pn option.
If either the pingDelay or pingNumbers variable is set to 0, the installation will not forgive any network latencies, and a target server could be unregistered just because the network was slow for a short time.
The vertical tab character is not supported in any of the registry fields and should never be used.
- -d | -directory
- Specify the directory containing the registry database file.
- -h | -help
- Display a help message summarizing target-registry usage and options.
- -pd pingDelay
- Set the delay between two pings on a dead target server.
- -pn pingNumbers
- Set the number of failed pings before considering a target server dead.
- -use_portmapper
- Use the local portmapper to register the target servers RPC services. This flag must be set if version 1.x Tornado tools or target servers have to connect using this registry.
- -V | -Verbose
- Turn on verbose mode. By default, the registry daemon is silent. Verbose mode displays information, warnings, and error messages.
- -v | -version
- Print the Tornado version.
Display the Tornado registry on line help.
wtxregd -hStart a Tornado registry in verbose mode.wtxregd -VStart a Tornado registry in verbose mode and save data base file in /tmp.wtxregd -V -d /tmpStart a Tornado registry using the local portmapper to register target servers.wtxregd -use_portmapperStart a Tornado registry with 30 seconds between two unsuccessful target server pings.wtxregd -V -pd 30Start the Tornado registry with only two failed pings allowed.wtxregd -V -pn 2Start the Tornado registry so that it unregisters target servers as soon as they seem to be unreachable.wtxregd -V -pn 0 wtxregd -V -pd 0
- WIND_BASE
- the root location of the Tornado tree.
- WINDBASE/.wind/wtxregd.hostName
- default location for the backup registry file (can be changed through the -d[irectory] option).
wtxregd, tgtsvr, launch, browser, windsh, wtxreg (UNIX only), Tornado User's Guide