after the Dubbo service is released, we can debug and manage it using the Telnet command.
Dubbo2.0.5 the above version of the service supply port supports Telnet commands, let me take a look at the following
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 into 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
Insertdemolist
Uploaddemolist
Deletedemolist
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. When calling the service interface to invoke the interface, pass in the parameters in JSON format (which is handy:-D), and then print the return value and the time spent.
Dubbo>invoke com.test.DemoService.queryDemoPageList ({"id": "100"}, 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 once Querydemopagelist, which is shown here as 0 (seemingly not very accurate, need to learn more)
Dubbo>count Com.test.DemoService
Dubbo>
+-------------------------+-------+--------+--------+---------+-----+
| Method | Total | Failed | active | Average | Max |
+-------------------------+-------+--------+--------+---------+-----+
| Querydemopagelist | 0 | 0 | 0 | 0ms | 0ms |
| Insertdemolist | 0 | 0 | 0 | 0ms | 0ms |
| Uploaddemolist | 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.htmTurn from
Distributed series-Dubbo Service telnet command-Qin Pengfei-Blog Park
Https://www.cnblogs.com/feiqihang/p/4387330.html
Reference
Dubbo Command-line explanation-CSDN Blog
79171957
Dubbo function Instructions-Love wife Easy-Blog Park
Https://www.cnblogs.com/php0368/p/4290791.html
Dubbo parameter and principle of performance tuning-cyfonly-Blog Park
Https://www.cnblogs.com/cyfonly/p/8987043.html
Distributed series-Dubbo service telnet command "go"