after the Dubbo service is released, we can debug and manage it using the Telnet command.
Dubbo2.0.5 above version of service provides port support Telnet command, below I take a look at
windows as an example : 1. Connection Service
Test if the Dubbo service under the corresponding IP and port is connected, the cmd command is as follows
telnet localhost 20880
Under normal circumstances, enter the Telnet window and type enter Enter the Dubbo command mode .
2. View Service List View service
Dubbo>ls
Com.test.DemoService
View interfaces in a service
Dubbo>ls Com.test.DemoService
Querydemopagelist
Insert DemoList
Upload DemoList
Delete DemoList
Ls
(List services and methods)
Ls
Displays the list of services.
Ls-l
Displays a list of service details.
LS Xxxservice
Displays a list of methods for the service.
Ls-l Xxxservice
Displays a list of method details for the service.
3. Invoking the Service interfaceWhen the interface is called, the parameters are passed in JSON format (which is handy:-D), and then the return value and time are printed.
Dubbo>invoke Com.test.DemoService . Query Demopagelist ({"id": "+"}, 1, 2)
{"TotalCount": 1, "data": [{Date ":" 2011-03-23 14:10:32 "," name ":" Zhang San "," keyword ": null}]}
Elapsed:10 Ms.
Invoke
Invoke Xxxservice.xxxmethod ({"prop": "Value"})
The method that invokes the service.
Invoke Xxxmethod ({"prop": "Value"})
Method that invokes the service (automatically finds the service that contains this method).
4. View service Statuslook at the number of service calls, but oddly enough, I've just called onceQueryDemopagelist , which is shown here as 0 ( Seems to be not accurate, need to understand further)
Dubbo>count Com.test.DemoService
Dubbo>
+-------------------------+-------+--------+--------+---------+-----+
| Method | Total | Failed | active | Average | Max |
+-------------------------+-------+--------+--------+---------+-----+
| QueryDemopagelist | 0 | 0 | 0 | 0ms | 0ms |
| Insert DemoList | 0 | 0 | 0 | 0ms | 0ms |
| upload DemoList | 0 | 0 | 0 | 0ms | 0ms |
| DeleteDemolist | 0 | 0 | 0 | 0ms | 0ms |
+-------------------------+-------+--------+--------+---------+-----+
Count
Count Xxxservice
Statistics 1 times the invocation of any method of service.
Count Xxxservice 10
Statistics 10 times the invocation of any method of service.
Count Xxxservice Xxxmethod
Counts the invocation of the 1-time service method.
Count Xxxservice Xxxmethod 10
Counts the invocation of the 10-time service method.
Status
Status
Displays the summary status, which summarizes the status of all resources and displays OK when all OK is displayed, as long as there is an error that displays the error, as long as a warn displays warn.
Status-l
Displays a list of states.
References:telnet Command Reference manual:Http://alibaba.github.io/dubbo-doc-static/Telnet+Command+Reference-zh-showComments=true&showCommentArea= True.htm
From for notes (Wiz)
Distributed series-Dubbo service telnet command