Manual: DHT shell
[English | Japanese]
last-updated: November 11, 2010
|
|
NAME
owdhtshell - DHT shell
SYNOPSIS
owdhtshell
[-p <shell port>]
[--acl <ACL file>]
[-n]
[--web]
[--showmap]
[-d <working dir>]
[-i <self ID>]
[-m <stat collector addr>[:<port>]]
[-t UDP|TCP]
[-a <algorithm name>]
[-r <routing style>]
[-s [<self address>[:<port>]]|<port>]
[--no-upnp]
[<host>[:<port>]] [<port>]
owdhtshell -h
DESCRIPTION
DHT shell is a command language interpreter
which controls a higher-level service DHT.
It invokes a node on a structured overlay
and controls a DHT service according to user's instructions
given from standard input and a network.
OPTIONS
If command-line arguments are specified,
DHT shell tries to join an overlay by contacting the specified node.
If an invalid option or -h is specified,
the shell shows help messages.
- -p <shell port>
- Wait on the specified TCP port to read shell instructions.
- --acl <ACL file>
- Read an access control list (ACL) from the specified file.
An ACL file contains lines as follows:
allow 192.168.0.12
allow host.example.com
deny
These lines are interpreted from top to bottom.
The first argument can be `allow' or `deny'.
An entry can have a hostname or an IP address as the second argument.
In the above case accesses from 192.168.0.12 and host.example.com are allowed
and accesses from others are prohibited.
- -n
- Do not read instructions from standard input.
This option is useful to invoke this tool via a job management system
like Sun N1 Grid Engine.
- --web
- Accept queries in an XML-RPC protocol on port 3998 of TCP.
The protocol is compatible with
Bamboo and
OpenDHT.
On the same port, DHT shell provides a web interface
on which we can see node information with a web browser.
- --showmap
- Web interface (--web) shows a routing path
on a geographical map (Google Maps).
You have to set your Google Maps API key properly in source code
if you use this feature.
- -d <working dir>
- Use the specified directory as the working directory.
A kind of Directory Service (e.g. Berkeley DB implementation)
creates DB files in the working directory.
- -i <self ID>
- Use the specified ID as the ID of the node being invoked itself.
The ID has to be a hexadecimal number.
If no ID is specified, the self ID is determined based on the self address.
- -m <stat collector addr[:<port>]>
- Use the specified address as the address of a statistics collector,
which is Message Counter or Overlay Visualizer.
DHT shell reports all communication to the specified address
via Messaging Service itself.
- -t < UDP|TCP>
- Use the specified transport protocol.
If no protocol is specified, UDP is used.
- -a <algorithm name>
- Use the specified routing algorithm.
Valid algorithm names are
"Chord", "Kademlia", "Koorde", "LinearWalker", "Pastry", and "Tapestry".
If no algorithm is specified, "Chord" is used.
- -r <routing style>
- Do routing in the specified style.
Valid styles are "Iterative" and "Recursive".
If no style is specified, DHT shell does "Iterative" routing.
- -s [<self address>[:<port>]]|<port>
- Use the specified address as the address of the node being invoked itself.
If not specified, DHT shell detects its own address automatically.
But this option is useful on a computer with multiple IP addresses
or inside a NA(P)T router.
- --no-upnp
- Disable UPnP NAT Traversal function.
- --oasis <port>
- Accept a query from OASIS
(web site)
replicas on the specified port.
SHELL COMMANDS
DHT shell reads user's instructions from standard input.
If -p option is specified, it also reads from a network.
It accepts the following instructions.
- init [-status] <host>[:<port>] [<port>]
- The node joins an overlay by contacting the specified node.
- get [-status] <key> [<key> ...]
- Get values which have been put with the specified key.
It accepts multiple keys at a time.
- put [-status] <key> <value> [<value> ...] [- <key> <value> [<value> ...] ...]
- Put the specified value with the specified key.
It accepts multiple key-value pairs at a time.
The pairs are separated by "-".
- remove|delete [-status] <secret> <key> [<value> ...] [- <key> [<value> ...] ...]
- Remove values associated with the specified key.
If a value is also specified, only the value is removed.
It accepts multiple remove requests at a time.
The requests are separated by "-".
- setttl <ttl>
- Specify the TTL.
The values stored by following put commands are kept for ttl second.
- setsecret <secret>
- Specify the secret.
The values stored by following put commands
can be removed later with the secret.
- status [<verbose level>]
- Print routing table contents and result of the last routing.
Some information is omitted
if a negative integer is specified as the verbose level.
- localdata
- Print key-value pairs which the node keeps.
- help|?
- Print help messages.
- quit|exit
- Terminates the shell.
- halt|stop
- Terminates the node.
- clear routingtable
- Clears the routing table.
- clear dht
- Clears values which the node holds.
- suspend
- Suspends the node, which can be resumed later.
- resume
- Resumes the node which has been suspended.
Return to Documents page
Return to Overlay Viewer main page