日期:2014-05-16  浏览次数:20501 次

ttserver管理
ttservctl

vi /usr/local/sbin/ttservctl,修改相关启动参数,通过ttservctl start|stop|restart控制服务

以下内容来自互联网,tt管理工具tcrmgr的相关参数

tcrmgr inform [-port num] [-st] host
Print miscellaneous information to the standard output. //在标准输出中打印出各种信息

tcrmgr put [-port num] [-sx] [-sep chr] [-dk|-dc] host key value
Store a record. //存储一条记录

tcrmgr out [-port num] [-sx] [-sep chr] host key
Remove a record. //移除一条记录

tcrmgr get [-port num] [-sx] [-sep chr] [-px] [-pz] host key
Print the value of a record.  //获取一条纪律的值

tcrmgr mget [-port num] [-sx] [-sep chr] [-px] host [key...]
Print keys and values of multiple records. //打印出多条记录的key&value

tcrmgr list [-port num] [-sep chr] [-m num] [-pv] [-px] [-fm str] host
Print keys of all records, separated by line feeds.//通过行分割来显示所有的记录的key

tcrmgr ext [-port num] [-xlr|-xlg] [-sx] [-sep chr] [-px] host func [key [value]]
Call a script language extension function. //调用一个脚本里的扩展函数

tcrmgr sync [-port num] host
Synchronize updated contents with the database file. //同步数据库文件

tcrmgr optimize [-port num] host [params]
Optimize the database file. //优化数据库文件

tcrmgr vanish [-port num] host
Remove all records.  //删除所有的记录

tcrmgr copy [-port num] host dpath
Copy the database file. //拷贝数据库文件(备份常用这个)

tcrmgr misc [-port num] [-mnu] [-sx] [-sep chr] [-px] host func [arg...]
Call a versatile function for miscellaneous operations.  //为复杂的操作调用一个通用的函数

tcrmgr importtsv [-port num] [-nr] [-sc] host [file]
Store records of TSV in each line of a file. //在文件的每行存储TSV记录

tcrmgr restore [-port num] [-ts num] [-rcc] host upath
Restore the database with update log.    //通过更新日志文件恢复数据库

tcrmgr setmst [-port num] [-mport num] [-ts num] [-rcc] host [mhost]
Set the replication master.  //设置同步主机

tcrmgr repl [-port num] [-ts num] [-sid num] [-ph] host
Replicate the update log.  //同步更新日志文件

tcrmgr http [-ah name value] [-ih] url
Fetch the resource of a URL by HTTP. //通过HTTP获取资源的URL

tcrmgr version
Print the version information of Tokyo Tyrant. //打印出TT的版本信息



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 :            -dc :
-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 :
-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.