ttserver管理

ttservctl

vi /usr/local/sbin/ttservctl,修改相關啓動參數,通過ttservctl start|stop|restart控制服務

[color=red]以下內容來自互聯網[/color],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的版本信息


[color=red]Options feature the following.[/color]
-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.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章