所有命令连接:http://pubs.vmware.com/vfabric53/index.jsp?topic=/com.vmware.vfabric.gemfire.7.0/tools_modules/gfsh/gfsh_command_index.html
连接:
connect --locator=localhost[40001]
查到member:
list members
查看region:
list regions
断开连接:
disconnect
查询语句:
query --query="select * from /SpotPoint"
查询一条记录语句:query --query="select * from /OriginalSpotQuote p where p.quoteId='USDSGD'" --interactive=false
--interactive:设置显示是否分页,默认为true 即分页显示
显示一个entity in
命令帮助:
get
Display an entry in a region:
get --key=value --region=value [--key-class=value] [--value-class=value]
eg:get --key=USDXAU --region=OriginalSpotQuote
key-class和value-class分别为key和value的数据类型
remove
Remove an entry from a region.
remove --region=value [--key=value] [--all(=value)?] [--key-class=value]
eg:remove --region=OriginalSpotQuote --key=USDXAU
show metrics
Display or export metrics for the entire distributed system, a member or a region.
软件度量(Metrics)是指对软件产品、软件开发过程或者资源的简单属性的定量描述
show metrics [--member=value] [--region=value] [--file=value] [--port=value] [--categories=value(,value)*]
eg:show metrics --region=OriginalSpotQuote
show log
Display the log for a member.
show log --member=value [--lines=value]
member | Required. Name/Id of the member whose log file will be displayed. |
lines | Number of lines from the log file to display. The maximum is 100. If the parameter is not specified, the default is 30. |