Telnet Command Reference¶
Since 2.0.5
dubbo starts supporting to use telnet command to govern services.
How To Use¶
telnet localhost 20880
Or:
echo status | nc -i 1 localhost 20880
It is possible to extend command status
to check more resources, pls. refer to extension references for more details.
Supported Commands¶
The built-in telnet commands are listed below. Furthermore, it is possible to extend telnet commands, pls. refer to extend telnet command for more details.
ls
¶
ls
: list servicesls -l
: list services in more detailsls XxxService
: list methods for the particular servicels -l XxxService
: list methods for the particular service in more dtails
ps
¶
ps
: list service portsps -l
: list service addressesps 20880
: show connection info for the particular portps -l 20880
: show connection info for the particular port in more details
cd
¶
cd XxxService
: switch default service. When default service is set, service parameter can be ignored in all commands when it's neededcd /
: reset default service
pwd
¶
pwd
: show what current default service is
trace
¶
trace XxxService
: trace method invocation once for the given servicetrace XxxService 10
: trace method invocations 10 times for the given servicetrace XxxService xxxMethod
: trace particular method invocation once for the given servicetrace XxxService xxxMethod 10
: trace particular method invocations 10 times for the given service
count
¶
count XxxService
: count method invocation once for the given servicecount XxxService 10
: count method invocations 10 times for the given servicecount XxxService xxxMethod
: count particular method invocation once for the given servicecount XxxService xxxMethod 10
: count particular method invocation 10 times for the given service
invoke
¶
invoke XxxService.xxxMethod(1234, "abcd", {"prop" : "value"})
: invoke particular method for the given serviceinvoke com.xxx.XxxService.XxxService.xxxMethod(1234, "abcd", {"prop" : "value"})
: invoke particular method for the given serviceinvoke xxxMethod(1234, "abcd", {"prop" : "value"})
: invoke particular method for the default serviceinvoke xxxMethod({"name":"zhangsan","age":12,"class":"org.apache.dubbo.qos.legacy.service.Person"})
:When there is parameter overload, or the type conversion fails, you can specify the class to be converted by adding the class attribute- When the parameter is Map
and the key type is Integer, it is recommended to specify the type. E.g: invoke com.xxx.xxxApiService({"3":0.123, "class":"java.util.HashMap"})
select
2¶
select 1
: used when the invoke command matches multiple methods, select the method to be called according to the prompt list
status
¶
status
: show summarized status. This status summarizes statuses from all resources, and it shows OK when all resources are OK, shows ERROR when any resource has ERROR, and WARN when any has WARN.status -l
: show status list
log
1¶
log debug
: modify logger level to debuglog 100
: examine the last 100 characters from the file logger
help
¶
help
: show help for telnet commandshelp xxx
: show help for particular telnet command
clear
¶
clear
: clear screenclear 100
: only clear particular lines on the screen
exit
¶
exit
: exit current telnet session
shutdown
2¶
shutdown
: shutdown dubbo applicationshutdown -t 1000
: delay 1000 ms to shutdown dubbo application