dubbo获取随机分配的端口

dubbo获取随机分配的端口

查看dubbo获取随机分配的端口

有时候会查看dubbo随机分配的端口:

[root@fake ~]# lsof -i|grep 5083(dubbo服务进程)|grep LISTEN   
java       5083    root    4u  IPv4   31473      0t0  TCP *:cslistener (LISTEN)
java       5083    root   88u  IPv6   31549      0t0  TCP *:20880 (LISTEN)

即20880就是该dubbo服务分配的随机端口

查看dubbo工作线程情况

C:\Users\Administrator>telnet 10.1.xxx.xxx 20880

status -l
+------------+--------+--------------------------------------------------------+
| resource   | status | message                                                |
+------------+--------+--------------------------------------------------------+
| load       | OK     | load:0.0,cpu:4                                         |
| server     | OK     | /10.1.xxx.xxx:20880(clients:8)                         |
| datasource | OK     | dataSourcejdbc:mysql://10.1.xxx.xxx:3306/(MySQL-5.7.23-log) |
| threadpool | OK     | Pool status:OK, max:200, core:200, largest:11, active:1, task:11, service port: 20880 |
| memory     | OK     | max:1927M,total:150M,used:37M,free:113M                |
| registry   | OK     | 10.1.xxx.xxx:2181(connected)                           |
| spring     | OK     | classpath*:META-INF/spring/*.xml                       |
| summary    | OK     |                                                        |
+------------+--------+--------------------------------------------------------+


dubbo>help
Please input "help [command]" show detail.
 log level                        - Change log level or show log
 pwd                              - Print working default service.
 trace [service] [method] [times] - Trace the service.
 clear [lines]                    - Clear screen.
 exit                             - Exit the telnet.
 help [command]                   - Show help.
 ls [-l] [service]                - List services and methods.
 invoke [service.]method(args)    - Invoke the service method.
 ps [-l] [port]                   - Print server ports and connections.
 cd [service]                     - Change default service.
 status [-l]                      - Show status.
 count [service] [method] [times] - Count the service.

猜你喜欢

转载自blog.csdn.net/u013887008/article/details/83855727