09/04
9
sudo ttserver -host 127.0.0.1 -port 1978 -thnum 8 -dmn -pid /home/tt/ttserver.pid -log /home/tt/ttserver.log -le -ulog /home/tt/ -ulim 128m -sid 1 -rts /home/tt/ttserver.rts /home/tt/database.tch
ttserver
The command `ttserver' runs the server managing a database instance. Because the database is treated by the abstract API of Tokyo Cabinet, you can choose the scheme on start-up of the server. Supported schema are on-memory hash database, on-memory tree database, hash database, and B+ tree database. This command is used in the following format. `dbname' specifies the database name. If it is omitted, on-memory hash database is specified.
ttserver [-host name] [-port num] [-thnum num] [-tout num] [-dmn] [-pid path] [-kl] [-log path] [-ld|-le] [-ulog path] [-ulim num] [-uas] [-sid num] [-mhost name] [-mport num] [-rts path] [-ext path] [-extpc name period] [-mask expr] [dbname]
Options feature the following.
* -host name : specify the host name or the address of the server. By default, every network address is bound.
* -port num : specify the port number. By default, it is 1978.
* -thnum num : specify the number of worker threads. By default, it is 8.
* -tout num : specify the timeout of each session in seconds. By default, no timeout is specified.
* -dmn : work as a daemon process.
* -pid path : output the process ID into the file.
* -kl : kill the existing process if the process ID file is detected.
* -log path : output log messages into the file.
* -ld : log debug messages also.
* -le : log error messages only.
* -ulog path : specify the update log directory.
* -ulim num : specify the limit size of each update log file.
* -uas : use asynchronous I/O for the update log.
* -sid num : specify the server ID.
* -mhost name : specify the host name of the replication master server.
* -mport num : specify the port number of the replication master server.
* -rts path : specify the replication time stamp file.
* -ext path : specify the script language extension file.
* -extpc name period : specify the function name and the calling period of a periodic command.
* -mask expr : specify the names of forbidden commands.
* -unmask expr : specify the names of allowed commands.
ttservctl
The command `ttservctl' is the startup script of the server. It can be called by the RC script of the bootstrap process of the operating system. This command is used in the following format.
ttservctl start
Startup the server.
ttservctl stop
Stop the server.
ttservctl restart
Restart the server.
ttservctl hup
Send HUP signal to the server for log rotation.
The database is placed as "/var/ttserver/casket.tch". The log and related files are also placed in "/var/ttserver". This command returns 0 on success, another on failure.
ttulmgr
The command `ttulmgr' is the utility to export and import the update log. It is useful to filter the update log with such text utilities as `grep' and `sed'. This command is used in the following format. `upath' specifies the update log directory.
ttulmgr export [-ts num] [-sid num] upath
Export the update log as TSV text data to the standard output.
ttulmgr import upath
Import TSV text data from the standard input to the update log.
Options feature the following.
* -ts num : specify the beginning time stamp.
* -sid num : specify the self server ID.
This command returns 0 on success, another on failure.
How to move the mysq
Tokyo Cabinet &


