使用telnet进行Dubbo接口测试

telnet进入dubbo

查看pid

$ jps -l
26048 org.apache.catalina.startup.Bootstrap
12388 org.jetbrains.jps.cmdline.Launcher
17492 com.shitou.Application
28452 sun.tools.jps.Jps
36196 com.jsy.OrderServerApplication

pid查询对应端口

$ netstat -ano |findstr 36196
TCP 0.0.0.0:2112 0.0.0.0:0 LISTENING 36196
TCP 0.0.0.0:20881 0.0.0.0:0 LISTENING 36196
TCP 18.16.202.169:2138 18.16.200.42:3306 ESTABLISHED 36196
TCP 18.16.202.169:2139 18.16.200.42:3306 ESTABLISHED 36196
TCP 18.16.202.169:2140 18.16.200.42:3306 ESTABLISHED 36196
TCP 18.16.202.169:2142 18.16.200.42:3306 ESTABLISHED 36196
TCP 18.16.202.169:2143 18.16.200.42:3306 ESTABLISHED 36196
TCP 18.16.202.169:2175 18.16.200.43:2181 ESTABLISHED 36196

telnet进入dubbo

telnet 127.0.0.1 20881

dubbo内命令查看

ls

  1. ls: 显示服务列表
  2. ls -l: 显示服务详细信息列表
  3. ls XxxService: 显示服务的方法列表
  4. ls -l XxxService: 显示服务的方法详细信息列表

查看该dubbo所有服务

dubbo>ls
com.jsy.order.api.OrderUfidaFacade
com.jsy.order.api.OrderPayAccountFacade
com.jsy.order.api.OrderTrialFacade
com.jsy.validation.ValidationFacade
com.jsy.order.api.OrderPayFacade
com.jsy.order.api.OrderFacade
com.jsy.order.api.OpenAccountHttpFacade
com.jsy.order.api.OpenAccountFacade
com.jsy.order.api.OrderFacade2
com.jsy.order.api.OrderRepaymentPlanFacade

查看dubbo所有服务详细信息

dubbo>ls -l
com.jsy.order.api.OrderUfidaFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderUfidaFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderUfidaFacade&methods=getOrderUfidaSplitAmount&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795641&version=1.0.0
com.jsy.order.api.OrderPayAccountFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderPayAccountFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderPayAccountFacade&methods=writeBankRepaymentPlan,orderPayment,getPayAccountStatus,getOrderBalance,orderPaymentAdvance,repaymentDetail&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795349&version=1.0.0
com.jsy.order.api.OrderTrialFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderTrialFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderTrialFacade&methods=checkTrial,orderSettleTrial,getOrderListByTrial&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795695&version=1.0.0
com.jsy.validation.ValidationFacade -> dubbo://169.254.173.208:20881/com.jsy.validation.ValidationFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.validation.ValidationFacade&methods=getAccessToken&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795477&version=1.0.0
com.jsy.order.api.OrderPayFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderPayFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderPayFacade&methods=updateOrderPayState,orderPay&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795535&version=1.0.0
com.jsy.order.api.OrderFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderFacade&methods=createOrder,getOrderBorrowMoneyByOrderId,getOrderRepaymentPlanList,queryOrderAlreadyPayTotal,calcLoanAmount,OrderSettleMoneyTrial,queryOrderAlreadyPayTotalBatch,getOrderMoneyFlowingWater&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795279&version=1.0.0
com.jsy.order.api.OpenAccountHttpFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OpenAccountHttpFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OpenAccountHttpFacade&methods=OpenAccount,getCustomerWhiteList,getBankList,CustomerValidation&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795199&version=1.0.0
com.jsy.order.api.OpenAccountFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OpenAccountFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OpenAccountFacade&methods=OpenAccount,getCustomerWhiteList,getBankList,CustomerValidation&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795079&version=1.0.0
com.jsy.order.api.OrderFacade2 -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderFacade2?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderFacade2&methods=getOrderByOrderId&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795588&version=1.0.0
com.jsy.order.api.OrderRepaymentPlanFacade -> dubbo://169.254.173.208:20881/com.jsy.order.api.OrderRepaymentPlanFacade?anyhost=true&application=assets-order-server&dubbo=2.8.4&generic=false&group=DEV&interface=com.jsy.order.api.OrderRepaymentPlanFacade&methods=createPlans,viewPlan,getOrderPrepaymentPlanList&pid=36196&revision=1.0.0&side=provider&timestamp=1552984795414&version=1.0.0

查看某服务具体方法

dubbo>ls -l com.jsy.order.api.OrderRepaymentPlanFacade
com.jsy.apiutil.entity.BaseRes viewPlan(java.lang.String)
com.jsy.apiutil.entity.BaseRes createPlans(java.lang.String)
com.jsy.apiutil.entity.BaseRes getOrderPrepaymentPlanList(java.lang.String,java.lang.String,java.lang.String,java.lang.String)

ps:

  1. ps: 显示服务端口列表
  2. ps -l: 显示服务地址列表
  3. ps 20880: 显示端口上的连接信息
  4. ps -l 20880: 显示端口上的连接详细信息
dubbo>ps
20881 dubbo>ps -l
dubbo://18.16.200.95:20881 dubbo>ps 20881
/18.16.200.47:33608
/18.16.200.84:18394
/18.16.200.74:12150
/18.16.200.110:49710
/18.16.200.110:57710
/18.16.200.75:62839
/127.0.0.1:57041 dubbo>ps -l 20881
/18.16.200.47:33608 -> /18.16.200.95:20881
/18.16.200.84:18394 -> /18.16.200.95:20881
/18.16.200.74:12150 -> /18.16.200.95:20881
/18.16.200.110:49710 -> /18.16.200.95:20881
/18.16.200.110:57710 -> /18.16.200.95:20881
/18.16.200.75:62839 -> /18.16.200.95:20881
/127.0.0.1:57041 -> /127.0.0.1:20881

trace:

  1. trace XxxService: 跟踪 1 次服务任意方法的调用情况
  2. trace XxxService 10: 跟踪 10 次服务任意方法的调用情况
  3. trace XxxService xxxMethod: 跟踪 1 次服务方法的调用情况
  4. trace XxxService xxxMethod 10: 跟踪 10 次服务方法的调用情况
dubbo>trace com.jsy.order.api.OrderTrialFacade

/18.16.202.169:2732 -> com.jsy.order.api.OrderTrialFacade.getOrderListByTrial([["օ·¼","²㋔"]]) -> {"msg":"³ɹ¦","data":[{"colligateRate":0.15,"expireTime":"2019-03-21 17:45:24","issue":3,"loanNo":"JSY20190315000001","loanStatus":"6","paymentTypeDesc":"ЈϢº												

	
	
上一篇:CSS3 3D立方体效果-transform也不过如此


下一篇:深入node之Transform