TTSERVER(1)

πŸ“¦ version 1.1.41, in nixos 26.05, nixpkgs unstable

🌸 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 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.
  • -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, and capsiz.
  • On-memory tree database supports capnum and capsiz.
  • Hash database supports mode, bnum, apow, fpow, opts, rcnum, and xmsiz.
  • B+ tree database supports mode, lmemb, nmemb, bnum, apow, fpow, opts, lcnum, ncnum, and xmsiz.
  • Fixed-length database supports mode, width, and limsiz.
  • Table database supports mode, bnum, apow, fpow, opts, rcnum, lcnum, ncnum, xmsiz, and idx.

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 of get, mget, vsiz, iterinit, iternext, fwmkeys, rnum, size, and stat.
  • allwrite β€” the abbreviation of put, putkeep, putcat, putshl, putnr, out, addint, adddouble, vanish, and misc.
  • allmanage β€” the abbreviation of sync, optimize, copy, restore, and setmst.
  • 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