TTSERVER(1)
πΈ NAME πΈ
ttserver β the server of Tokyo Tyrant. That's the whole name section, bestie β short, iconic, main character energy π
.
β¨ DESCRIPTION β¨
Ok so bestie, 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.
π οΈ the format (a.k.a. the synopsis)
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] [-rcc] [-skel name] [-mul num] [-ext path] [-extpc name period] [-mask expr] [-unmask expr] [dbname]
π the option menu, one by one
Options feature the following, fr fr:
-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 is1978.-thnum numβ specify the number of worker threads. By default, it is8.-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.-rccβ check consistency of replication.-skel nameβ specify the name of the skeleton database library.-mul numβ specify the division number of the multiple database mechanism.-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.
π shutdown, restart, sockets, and exit status
To terminate the server normally, send SIGINT or SIGTERM to the process. It is okay to press Ctrl+C on the controlling terminal. To restart the server, send SIGHUP to the process. If the port number is not more than 0, UNIX domain socket is used and the path of the socket file is specified by the host parameter. This command returns 0 on success, another on failure.
Bestie, that last bit is the vibe check: 0 means slay, literally any other value means nope π.
ποΈ database names + tuning (iykyk)
The naming convention of the database is specified by the abstract API of Tokyo Cabinet. Here's the mapping, no cap:
- If the name is
"*", the database will be an on-memory hash database. - If it is
"+", the database will be an on-memory tree database. - If its suffix is
.tch, the database will be a hash database. - If its suffix is
.tcb, the database will be a B+ tree database. - If its suffix is
.tcf, the database will be a fixed-length database. - If its suffix is
.tct, the database will be a table database. - Otherwise, this function fails.
Tuning parameters can trail the name, separated by #. Each parameter is composed of the name and the value, separated by =. The supported tuning parameters are giving specific, bestie:
- On-memory hash database supports
bnum,capnum, andcapsiz. - On-memory tree database supports
capnumandcapsiz. - Hash database supports
mode,bnum,apow,fpow,opts,rcnum, andxmsiz. - B+ tree database supports
mode,lmemb,nmemb,bnum,apow,fpow,opts,lcnum,ncnum, andxmsiz. - Fixed-length database supports
mode,width, andlimsiz. - Table database supports
mode,bnum,apow,fpow,opts,rcnum,lcnum,ncnum,xmsiz, andidx.
The tuning parameter capnum specifies the capacity number of records. capsiz specifies the capacity size of using memory. Records spilled the capacity are removed by the storing order. mode can contain w of writer, r of reader, c of creating, t of truncating, e of no locking, and f of non-blocking lock. The default mode is relevant to wc. opts can contains l of large option, d of Deflate option, b of BZIP2 option, and t of TCBS option. idx specifies the column name of an index and its type separated by :. For example, casket.tch#bnum=1000000#opts=ld means that the name of the database file is casket.tch, and the bucket number is 1000000, and the options are large and Deflate.
π« command mask expressions (the allow/deny list)
The command mask expression is a list of command names separated by ,. For example, out,vanish,copy means a set of out, vanish, and copy. Commands of the memcached compatible protocol and the HTTP compatible protocol are also forbidden or allowed, related by the mask of each original command. Moreover, there are meta expressions, bestie:
allβ all commands.allorgβ all commands of the original binary protocol.allmcβ all commands of the memcached compatible protocol.allhttpβ all commands of the HTTP compatible protocol.allreadβ the abbreviation ofget,mget,vsiz,iterinit,iternext,fwmkeys,rnum,size, andstat.allwriteβ the abbreviation ofput,putkeep,putcat,putshl,putnr,out,addint,adddouble,vanish, andmisc.allmanageβ the abbreviation ofsync,optimize,copy,restore, andsetmst.replβ replication as master.slaveβ replication as slave.
π«Ά SEE ALSO π«Ά
Peace out bestie β that's Man Page, dated 2010-08-05, for TTSERVER(1) πβ¨
π¦ where this page comes from
- nixos 26.05: tokyotyrant 1.1.41
- nixpkgs unstable: tokyotyrant 1.1.41
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms