{"id":2026,"date":"2023-04-01T20:04:24","date_gmt":"2023-04-01T12:04:24","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=2026"},"modified":"2023-04-07T06:14:19","modified_gmt":"2023-04-06T22:14:19","slug":"dubbo-service-telnet-command","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/04\/01\/dubbo-service-telnet-command\/","title":{"rendered":"Dubbo\u670d\u52a1telnet\u547d\u4ee4"},"content":{"rendered":"<p>Dubbo\u670d\u52a1\u53d1\u5e03\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528telnet\u547d\u4ee4\u8fdb\u884c\u8c03\u8bd5\u3001\u7ba1\u7406\u3002Dubbo2.0.5\u4ee5\u4e0a\u7248\u672c\u670d\u52a1\u63d0\u4f9b\u7aef\u53e3\u652f\u6301telnet\u547d\u4ee4\u3002<\/p>\n<h3>\u8fde\u63a5\u670d\u52a1<\/h3>\n<p>\u6d4b\u8bd5\u5bf9\u5e94IP\u548c\u7aef\u53e3\u4e0b\u7684dubbo\u670d\u52a1\u662f\u5426\u8fde\u901a\uff0ccmd\u547d\u4ee4\u5982\u4e0b<\/p>\n<p><!-- more --><\/p>\n<pre><code>>telnet localhost 20880<\/code><\/pre>\n<p>\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fdb\u5165telnet\u7a97\u53e3\uff0c\u952e\u5165\u56de\u8f66\u8fdb\u5165dubbo\u547d\u4ee4\u6a21\u5f0f\u3002<\/p>\n<pre><code>dubbo&gt;<\/code><\/pre>\n<h3>\u67e5\u770b\u670d\u52a1\u5217\u8868<\/h3>\n<p>\u67e5\u770b\u670d\u52a1<\/p>\n<pre><code>dubbo&gt;ls\n\ncom.test.DemoService<\/code><\/pre>\n<p>\u67e5\u770b\u670d\u52a1\u4e2d\u7684\u63a5\u53e3<\/p>\n<pre><code>dubbo&gt;ls com.test.DemoService\n\nqueryDemoPageList\ninsertDemolist\nuploadDemoList\ndeleteDemolist<\/code><\/pre>\n<h4>ls (list services and methods)<\/h4>\n<ul>\n<li>ls<\/li>\n<\/ul>\n<p>\u663e\u793a\u670d\u52a1\u5217\u8868\u3002<\/p>\n<ul>\n<li>ls -l<\/li>\n<\/ul>\n<p>\u663e\u793a\u670d\u52a1\u8be6\u7ec6\u4fe1\u606f\u5217\u8868\u3002<\/p>\n<ul>\n<li>ls XxxService<\/li>\n<\/ul>\n<p>\u663e\u793a\u670d\u52a1\u7684\u65b9\u6cd5\u5217\u8868\u3002<\/p>\n<ul>\n<li>ls -l XxxService<\/li>\n<\/ul>\n<p>\u663e\u793a\u670d\u52a1\u7684\u65b9\u6cd5\u8be6\u7ec6\u4fe1\u606f\u5217\u8868\u3002<\/p>\n<h3>\u8c03\u7528\u670d\u52a1\u63a5\u53e3<\/h3>\n<p>\u8c03\u7528\u63a5\u53e3\u65f6\uff0c\u4ee5JSON\u683c\u5f0f\u4f20\u5165\u53c2\u6570\uff0c\u7136\u540e\u6253\u5370\u8fd4\u56de\u503c\u548c\u6240\u7528\u65f6\u95f4\u3002<\/p>\n<pre><code>dubbo&gt;invoke com.test.DemoService.queryDemoPageList({&quot;id&quot;:&quot;100&quot;}, 1, 2)\n\n{&quot;totalCount&quot;:1,&quot;data&quot;:[{date&quot;:&quot;2011-03-23 14:10:32&quot;,&quot;name&quot;:&quot;\u5f20\u4e09&quot;,&quot;keyword&quot;:null}]}\nelapsed: 10 ms.<\/code><\/pre>\n<h4>invoke<\/h4>\n<ul>\n<li>invoke XxxService.xxxMethod({&quot;prop&quot;: &quot;value&quot;})<\/li>\n<\/ul>\n<p>\u8c03\u7528\u670d\u52a1\u7684\u65b9\u6cd5\u3002<\/p>\n<ul>\n<li>invoke xxxMethod({&quot;prop&quot;: &quot;value&quot;})<\/li>\n<\/ul>\n<p>\u8c03\u7528\u670d\u52a1\u7684\u65b9\u6cd5(\u81ea\u52a8\u67e5\u627e\u5305\u542b\u6b64\u65b9\u6cd5\u7684\u670d\u52a1)\u3002<\/p>\n<h3>\u67e5\u770b\u670d\u52a1\u72b6\u6001<\/h3>\n<p>\u67e5\u770b\u670d\u52a1\u8c03\u7528\u6b21\u6570\uff0c\u4e0d\u8fc7\u6bd4\u8f83\u5947\u602a\u7684\u662f\uff0c\u521a\u624d\u5df2\u7ecf\u8c03\u7528\u8fc7\u4e00\u6b21queryDemoPageList\uff0c\u800c\u8fd9\u91cc\u663e\u793a\u7684\u4e3a0\uff08\u8c8c\u4f3c\u4e0d\u592a\u51c6\uff0c\u6709\u5f85\u8fdb\u4e00\u6b65\u4e86\u89e3\uff09<\/p>\n<pre><code>dubbo&gt;count com.test.DemoService\n\n+-------------------------+-------+--------+--------+---------+-----+\n\n| method                  | total | failed | active | average | max |\n\n+-------------------------+-------+--------+--------+---------+-----+\n\n| queryDemoPageList | 0     | 0      | 0      | 0ms     | 0ms |\n\n| insertDemolist    | 0     | 0      | 0      | 0ms     | 0ms |\n\n| uploadDemoList    | 0     | 0      | 0      | 0ms     | 0ms |\n\n| deleteDemolist    | 0     | 0      | 0      | 0ms     | 0ms |\n\n+-------------------------+-------+--------+--------+---------+-----+<\/code><\/pre>\n<h4>count<\/h4>\n<ul>\n<li>count XxxService<\/li>\n<\/ul>\n<p>\u7edf\u8ba11\u6b21\u670d\u52a1\u4efb\u610f\u65b9\u6cd5\u7684\u8c03\u7528\u60c5\u51b5\u3002<\/p>\n<ul>\n<li>count XxxService 10<\/li>\n<\/ul>\n<p>\u7edf\u8ba110\u6b21\u670d\u52a1\u4efb\u610f\u65b9\u6cd5\u7684\u8c03\u7528\u60c5\u51b5\u3002<\/p>\n<ul>\n<li>count XxxService xxxMethod<\/li>\n<\/ul>\n<p>\u7edf\u8ba11\u6b21\u670d\u52a1\u65b9\u6cd5\u7684\u8c03\u7528\u60c5\u51b5\u3002<\/p>\n<ul>\n<li>count XxxService xxxMethod 10<\/li>\n<\/ul>\n<p>\u7edf\u8ba110\u6b21\u670d\u52a1\u65b9\u6cd5\u7684\u8c03\u7528\u60c5\u51b5\u3002<\/p>\n<h4>status<\/h4>\n<ul>\n<li>status<\/li>\n<\/ul>\n<p>\u663e\u793a\u6c47\u603b\u72b6\u6001\uff0c\u8be5\u72b6\u6001\u5c06\u6c47\u603b\u6240\u6709\u8d44\u6e90\u7684\u72b6\u6001\uff0c\u5f53\u5168\u90e8OK\u65f6\u5219\u663e\u793aOK\uff0c\u53ea\u8981\u6709\u4e00\u4e2aERROR\u5219\u663e\u793aERROR\uff0c\u53ea\u8981\u6709\u4e00\u4e2aWARN\u5219\u663e\u793aWARN\u3002<\/p>\n<ul>\n<li>status -l<\/li>\n<\/ul>\n<p>\u663e\u793a\u72b6\u6001\u5217\u8868\u3002<\/p>\n<h3>\u53c2\u8003\u8d44\u6599<\/h3>\n<p>Telnet\u547d\u4ee4\u53c2\u8003\u624b\u518c\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/alibaba.github.io\/dubbo-doc-static\/Telnet+Command+Reference-zh-showComments=true&amp;showCommentArea=true.htm\">http:\/\/alibaba.github.io\/dubbo-doc-static\/Telnet+Command+Reference-zh-showComments=true&#038;showCommentArea=true.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dubbo\u670d\u52a1\u53d1\u5e03\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528telnet\u547d\u4ee4\u8fdb\u884c\u8c03\u8bd5\u3001\u7ba1\u7406\u3002Dubbo2.0.5\u4ee5\u4e0a\u7248\u672c\u670d\u52a1\u63d0\u4f9b\u7aef\u53e3\u652f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[196],"tags":[],"class_list":["post-2026","post","type-post","status-publish","format-standard","hentry","category-dubbo"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2026"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2026\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}