Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the practical commands for debugging management of dubbo services

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you what are the practical commands for dubbo service debugging management. The content is concise and easy to understand. It will definitely make your eyes shine. I hope you can gain something through the detailed introduction of this article.

If the company is developed by project groups, each project group calls the interface of each project group. Sometimes it is necessary to debug the interface of the other party in the joint debugging environment. You can directly telnet to the dubbo service to view the interfaces and methods that have been deployed through the command, and directly invoke specific methods. We can use the telnet command for debugging and management.

Dubbo 2.0.5 and above provide port support for telnet command. Here is an example:

1. connection service

Test whether the dubbo service under the corresponding IP and port is connected. The cmd command is as follows

telnetlocalhost 20880

Under normal circumstances, enter telnet window, type enter to enter dubbo command mode.

dubbo>

2. View list of services

viewing service

dubbo>ls

com.test.DemoService

View interfaces in a service

dubbo>ls com.test.DemoService

queryDemoPageList

insertDemolist

uploadDemoList

deleteDemolist

ls

(listservices and methods)

ls

Displays a list of services.

ls -l

Displays a list of service details.

lsXxxService

Displays a list of methods for the service.

ls -lXxxService

Displays a list of method details for the service.

3. invoke service interface

When calling the interface, pass in the parameters in JSON format (which is convenient:-D), and print the return value and elapsed time.

dubbo>invoke com.test.DemoService.queryDemoPageList({"id":"100"},1,2)

{"totalCount":1,"data":[{date":"2011-03-2314:10:32","name":" Zhang San ","keyword":null}]}

elapsed: 10 ms.

invoke

invokeXxxService.xxxMethod({"prop":"value"})

Calls the method of the service.

invokexxxMethod({"prop":"value"})

Calls the method of the service (automatically finds services that contain this method).

4. View service status

Check the number of service calls, but the strange thing is that I have just called queryDemoPageList once, and the display here is 0 (seems to be inaccurate, to be further understood)

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

countXxxService

Statistics 1 call to any method of the service.

countXxxService 10

Count 10 calls to any method of the service.

countXxxService xxxMethod

Count 1 invocation of service method.

countXxxService xxxMethod 10

Count 10 calls to service methods.

status

status

Displays summary status, which summarizes the status of all resources, displaying OK when all are OK, ERROR when there is one ERROR, and WARN when there is one WARN.

status -l

Displays a list of states.

What are the practical commands for dubbo service debugging management? Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report