haoningabc 发表于 2013-2-4 14:11:49

TT命令

★★★★★服务端
ttserver
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.-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.
-----------------
ttservctl
start
stop
hup
----------------
ttulmgr
时间戳用date +%s察看 详细参考http://xok.la/2008/06/linux_date_transfer.html
date +%s得到时间戳,ps -ef|grep ttserver得到ttserver的sid
比如ttulmgr export -ts 1300000000 -sid 2065 /data/ttserver_cache/ulog/
ttulmgr export [-ts num ] [-sid num ] upathExport the update log as TSV text data to the standard output.ttulmgr import upathImport 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.
★★★★★★★★★客户端
tcrtest
tcrtest write [-port num ] [-cnum num ] [-tout num ] [-nr] [-rnd] host rnumStore records with keys of 8 bytes. They change as `00000001', `00000002'...tcrtest read [-port num ] [-cnum num ] [-tout num ] [-mul num ] [-rnd] hostRetrieve all records of the database above.tcrtest remove [-port num ] [-cnum num ] [-tout num ] [-rnd] hostRemove all records of the database above.tcrtest rcat [-port num ] [-cnum num ] [-tout num ] [-shl num ] [-dai|-dad] [-ext name] [-xlr|-xlg] host rnumStore records with partway duplicated keys using concatenate mode.tcrtest misc [-port num ] [-cnum num ] [-tout num ] host rnumPerform miscellaneous test of various operations.tcrtest wicked [-port num ] [-cnum num ] [-tout num ] host rnumPerform updating operations of list and map selected at random.tcrtest table [-port num ] [-cnum num ] [-tout num ] [-exp num ] host rnumPerform miscellaneous test of the table extension.Options feature the following.-port num : specify the port number.-cnum num : specify the number of connections.-tout num : specify the timeout of each session in seconds.-nr : use the function `tcrdbputnr' instead of `tcrdbput'.-rnd : select keys at random.-mul num : specify the number of records for the mget command.-shl num : use `tcrdbputshl' and specify the width.-dai : use `tcrdbaddint' instead of `tcrdbputcat'.-dad : use `tcrdbadddouble' instead of `tcrdbputcat'.-ext name : call a script language extension function.-xlr : perform record locking.-xlg : perform global locking.-exp num : specify the lifetime of expiration test.
-----------------
tcrmttest
tcrmttest write [-port num ] [-tnum num ] [-nr] [-rnd] [-ext name] host rnumStore records with keys of 8 bytes. They change as `00000001', `00000002'...tcrmttest read [-port num ] [-tnum num ] [-mul num ] hostRetrieve all records of the database above.tcrmttest remove [-port num ] [-tnum num ] hostRemove all records of the database above.Options feature the following.-port num : specify the port number.-tnum num : specify the number of running threads.-nr : use the function `tcrdbputnr' instead of `tcrdbput'.-rnd : select keys at random.-ext name : call a script language extension function.-mul num : specify the number of records for the mget command.

-----
tcrmgr
tcrmgr inform [-port num ] [-st] hostPrint miscellaneous information to the standard output.tcrmgr put [-port num ] [-sx] [-sep chr ] [-dk|-dc|-dai|-dad] host key valueStore a record.tcrmgr out [-port num ] [-sx] [-sep chr ] host keyRemove a record.tcrmgr get [-port num ] [-sx] [-sep chr ] [-px] [-pz] host keyPrint the value of a record.tcrmgr mget [-port num ] [-sx] [-sep chr ] [-px] host Print keys and values of multiple records.tcrmgr list [-port num ] [-sep chr ] [-m num ] [-pv] [-px] [-fm str ] hostPrint keys of all records, separated by line feeds.tcrmgr ext [-port num ] [-xlr|-xlg] [-sx] [-sep chr ] [-px] host func ]Call a script language extension function.tcrmgr sync [-port num ] hostSynchronize updated contents with the database file.tcrmgr optimize [-port num ] host Optimize the database file.tcrmgr vanish [-port num ] hostRemove all records.tcrmgr copy [-port num ] host dpathCopy the database file.tcrmgr misc [-port num ] [-mnu] [-sx] [-sep chr ] [-px] host func Call a versatile function for miscellaneous operations.tcrmgr importtsv [-port num ] [-nr] [-sc] host Store records of TSV in each line of a file.tcrmgr restore [-port num ] [-ts num ] [-rcc] host upathRestore the database with update log.tcrmgr setmst [-port num ] [-mport num ] [-ts num ] [-rcc] host Set the replication master.tcrmgr repl [-port num ] [-ts num ] [-sid num ] [-ph] hostReplicate the update log.tcrmgr http [-ah name value] [-ih] urlFetch the resource of a URL by HTTP.tcrmgr versionPrint the version information of Tokyo Tyrant.Options feature the following.-port num : specify the port number.-st : print miscellaneous status data.-sx : input data is evaluated as a hexadecimal data string.-sep chr : specify the separator of the input data.-dk : use the function `tcrdbputkeep' instead of `tcrdbput'.-dc : use the function `tcrdbputcat' instead of `tcrdbput'.-dai : use the function `tcrdbaddint' instead of `tcrdbput'.-dad : use the function `tcrdbadddouble' instead of `tcrdbput'.-px : output data is converted into a hexadecimal data string.-pz : do not append line feed at the end of the output.-m num : specify the maximum number of the output.-pv : print values of records also.-fm str : specify the prefix of keys.-xlr : perform record locking.-xlg : perform global locking.-mnu : omit the update log.-nr : use the function `tcrdbputnr' instead of `tcrdbput'.-sc : normalize keys as lower cases.-mport num : specify the port number of the replication master.-ts num : specify the beginning time stamp.-rcc : check consistency of replication.-sid num : specify the self server ID.-ph : print human-readable data.-ah name value : add a request header.-ih : output response headers also.
页: [1]
查看完整版本: TT命令