KTSERVER(1)

NAME
ktserver - a lightweight database server

DESCRIPTION

The command `ktserver' runs the server managing database instances. This command is used in the following format. `db' specifies a database name. If no database is specified, an unnamed on-memory database is opened.

    ktserver [-host str] [-port num] [-tout num] [-th num] [-log file] [-li|-ls|-le|-lz] [-ulog dir] [-ulim num] [-uasi num] [-sid num] [-ord] [-oat|-oas|-onl|-otl|-onr] [-asi num] [-ash] [-bgs dir] [-bgsi num] [-bgc str] [-dmn] [-pid file] [-scr file] [-mhost str] [-mport num] [-rts file] [-riv num] [-plsv file] [-plex str] [-pldb file] [db...]

Options feature the following.

    -host str : specifies the host name of the server.
    -port num : specifies the port number of the server.
    -tout num : specifies the timeout in seconds.
    -th num : specifies the number of worker threads. By default, it is 8.
    -log file : specifies the path of the log file. By default, logs are written into the standard output.
    -li : sets the logging level "INFO".
    -ls : sets the logging level "SYSTEM".
    -le : sets the logging level "ERROR".
    -lz : sets the logging level "NONE".
    -ulog dir : specifies the path of the update log directory. By default, it is disabled.
    -ulim num : specifies the limit size of each update log file.
    -uasi num : specifies the interval of synchronization of update log files. By default, it is disabled.
    -sid num : specifies the server ID number.
    -ord : opens the database as a reader.
    -oat : opens the database with the auto transaction option.
    -oas : opens the database with the auto synchronization option.
    -onl : opens the database with the no locking option.
    -otl : opens the database with the try locking option.
    -onr : opens the database with the no auto repair option.
    -asi num : specifies the interval of auto synchronization. By default, it is disabled.
    -ash : does physical synchronization while auto synchronization.
    -bgs dir : specifies the path of the background snapshot directory. By default, it is disabled.
    -bgsi num : specifies the interval of background snapshotting. By default, it is 180.
    -bgsc str : specifies the compression algorithm of the snapshot. "zlib", "lzo", are "lzma" are supported.
    -dmn : switches to a daemon process.
    -pid file : specifies the file to contain the process ID to send signals by.
    -cmd dir : specifies the command search path for outer commands. By default, it is the current directroy.
    -scr file : specifies the script file for the scripting extention.
    -mhost str : specifies the host name of the master server of replication.
    -mport num : specifies the port number of the master server of replication.
    -rts file : specifies the file to contain the replication time stamp.
    -riv num : specifies the interval of each replication operation in milliseconds. By default, it is 0.04.
    -plsv file : specifies the shared library file of a pluggable server.
    -plex str : specifies the configuration expression of a pluggable server.
    -pldb file : specifies the shared library file of a pluggable database.

This command returns 0 on success, another on failure.

To finish the server process running on foreground, input `Ctrl-C' on the terminal. To finish the server process running as a daemon, send a termination signal such as SIGTERM by the `kill' command. If a daemon process catches SIGHUP, the server restarts and the log file is re-opened. Because thr current directory of a daemon process is changed to the root directory, paths of related files should be described as their absolute paths.

The naming convention of database name is the same as polymorphic database of Kyoto Cabinet. If it is "-", the database will be a prototype hash database. If it is "+", the database will be a prototype tree database. If it is ":", the database will be a stash database. If it is "*", the database will be a cache hash database. If it is "%", the database will be a cache tree database. If its suffix is ".kch", the database will be a file hash database. If its suffix is ".kct", the database will be a file tree database. If its suffix is ".kcd", the database will be a directory hash database. If its suffix is ".kcf", the database will be a directory tree database. Tuning parameters can trail the name, separated by "#". Each parameter is composed of the name and the value, separated by "=". If the "type" parameter is specified, the database type is determined by the value in "-", "+", ":", "*", "%", "kch", "kct", "kcd", and "kcf". All database types support the logging parameters of "log", "logkinds", and "logpx". The prototype hash database and the prototype tree database do not support any other tuning parameter. The stash database supports "bnum". The cache hash database supports "opts", "bnum", "zcomp", "capcnt", "capsiz", and "zkey". The cache tree database supports all parameters of the cache hash database except for capacity limitation, and supports "psiz", "rcomp", "pccap" in addition. The file hash database supports "apow", "fpow", "opts", "bnum", "msiz", "dfunit", "zcomp", and "zkey". The file tree database supports all parameters of the file hash database and "psiz", "rcomp", "pccap" in addition. The directory hash database supports "opts", "zcomp", and "zkey". The directory tree database supports all parameters of the directory hash database and "psiz", "rcomp", "pccap" in addition.

Furthermore, several parameters are added by Kyoto Tycoon. "ktopts" sets options and the value can contain "p" for the persistent option. "ktcapcnt" sets the capacity by record number. "ktcapsiz" sets the capacity by database size.

SEE ALSO

ktremotetest(1), ktremotemgr(1)