.TH "TCRMGR" 1 "2010-01-20" "Man Page" "Tokyo Tyrant" .SH NAME tcrmgr \- the command line utility of the remote database API .SH DESCRIPTION The command `\fBtcrmgr\fR' is a utility for test and debugging of the remote database API and its applications. `\fIhost\fR' specifies the host name of the server. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIparams\fR' specifies the tuning parameters. `\fIdpath\fR' specifies the destination file. `\fIfunc\fR specifies the name of the function. `\fIarg\fR' specifies the arguments of the function. `\fIfile\fR' specifies the input file. `\fIupath\fR' specifies the update log directory. `\fImhost\fR' specifies the host name of the replication master. `\fIurl\fR' specifies the target URL. .PP .RS .br \fBtcrmgr inform \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-st\fR]\fB \fIhost\fB\fR .RS Print miscellaneous information to the standard output. .RE .br \fBtcrmgr put \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-dk\fR|\fB\-dc\fR|\fB\-dai\fR|\fB\-dad\fR]\fB \fIhost\fB \fIkey\fB \fIvalue\fB\fR .RS Store a record. .RE .br \fBtcrmgr out \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fIhost\fB \fIkey\fB\fR .RS Remove a record. .RE .br \fBtcrmgr get \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIhost\fB \fIkey\fB\fR .RS Print the value of a record. .RE .br \fBtcrmgr mget \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-px\fR]\fB \fIhost\fB \fR[\fB\fIkey\fB...\fR]\fB\fR .RS Print keys and values of multiple records. .RE .br \fBtcrmgr list \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-m \fInum\fB\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-fm \fIstr\fB\fR]\fB \fIhost\fB\fR .RS Print keys of all records, separated by line feeds. .RE .br \fBtcrmgr ext \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-xlr\fR|\fB\-xlg\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-px\fR]\fB \fIhost\fB \fIfunc\fB \fR[\fB\fIkey\fB \fR[\fB\fIvalue\fB\fR]\fB\fR]\fB\fR .RS Call a script language extension function. .RE .br \fBtcrmgr sync \fR[\fB\-port \fInum\fB\fR]\fB \fIhost\fB\fR .RS Synchronize updated contents with the database file. .RE .br \fBtcrmgr optimize \fR[\fB\-port \fInum\fB\fR]\fB \fIhost\fB \fR[\fB\fIparams\fB\fR]\fB\fR .RS Optimize the database file. .RE .br \fBtcrmgr vanish \fR[\fB\-port \fInum\fB\fR]\fB \fIhost\fB\fR .RS Remove all records. .RE .br \fBtcrmgr copy \fR[\fB\-port \fInum\fB\fR]\fB \fIhost\fB \fIdpath\fB\fR .RS Copy the database file. .RE .br \fBtcrmgr misc \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-mnu\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-sep \fIchr\fB\fR]\fB \fR[\fB\-px\fR]\fB \fIhost\fB \fIfunc\fB \fR[\fB\fIarg\fB...\fR]\fB\fR .RS Call a versatile function for miscellaneous operations. .RE .br \fBtcrmgr importtsv \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-nr\fR]\fB \fR[\fB\-sc\fR]\fB \fIhost\fB \fR[\fB\fIfile\fB\fR]\fB\fR .RS Store records of TSV in each line of a file. .RE .br \fBtcrmgr restore \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-ts \fInum\fB\fR]\fB \fR[\fB\-rcc\fR]\fB \fIhost\fB \fIupath\fB\fR .RS Restore the database with update log. .RE .br \fBtcrmgr setmst \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-mport \fInum\fB\fR]\fB \fR[\fB\-ts \fInum\fB\fR]\fB \fR[\fB\-rcc\fR]\fB \fIhost\fB \fR[\fB\fImhost\fB\fR]\fB\fR .RS Set the replication master. .RE .br \fBtcrmgr repl \fR[\fB\-port \fInum\fB\fR]\fB \fR[\fB\-ts \fInum\fB\fR]\fB \fR[\fB\-sid \fInum\fB\fR]\fB \fR[\fB\-ph\fR]\fB \fIhost\fB\fR .RS Replicate the update log. .RE .br \fBtcrmgr http \fR[\fB\-ah \fIname\fB \fIvalue\fB\fR]\fB \fR[\fB\-ih\fR]\fB \fIurl\fB\fR .RS Fetch the resource of a URL by HTTP. .RE .br \fBtcrmgr version\fR .RS Print the version information of Tokyo Tyrant. .RE .RE .PP Options feature the following. .PP .RS \fB\-port \fInum\fR\fR : specify the port number. .br \fB\-st\fR : print miscellaneous status data. .br \fB\-sx\fR : input data is evaluated as a hexadecimal data string. .br \fB\-sep \fIchr\fR\fR : specify the separator of the input data. .br \fB\-dk\fR : use the function `tcrdbputkeep' instead of `tcrdbput'. .br \fB\-dc\fR : use the function `tcrdbputcat' instead of `tcrdbput'. .br \fB\-dai\fR : use the function `tcrdbaddint' instead of `tcrdbput'. .br \fB\-dad\fR : use the function `tcrdbadddouble' instead of `tcrdbput'. .br \fB\-px\fR : output data is converted into a hexadecimal data string. .br \fB\-pz\fR : do not append line feed at the end of the output. .br \fB\-m \fInum\fR\fR : specify the maximum number of the output. .br \fB\-pv\fR : print values of records also. .br \fB\-fm \fIstr\fR\fR : specify the prefix of keys. .br \fB\-xlr\fR : perform record locking. .br \fB\-xlg\fR : perform global locking. .br \fB\-mnu\fR : omit the update log. .br \fB\-nr\fR : use the function `tcrdbputnr' instead of `tcrdbput'. .br \fB\-sc\fR : normalize keys as lower cases. .br \fB\-mport \fInum\fR\fR : specify the port number of the replication master. .br \fB\-ts \fInum\fR\fR : specify the beginning time stamp. .br \fB\-rcc\fR : check consistency of replication. .br \fB\-sid \fInum\fR\fR : specify the self server ID. .br \fB\-ph\fR : print human\-readable data. .br \fB\-ah \fIname\fR \fIvalue\fR\fR : add a request header. .br \fB\-ih\fR : output response headers also. .br .RE .PP 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. .SH SEE ALSO .PP .BR ttserver (1), .BR ttultest (1), .BR ttulmgr (1), .BR tcrtest (1), .BR tcrmttest (1), .BR ttutil (3), .BR tcrdb (3)