利用 telnet 调试 skynet
目录 一、安装 telnet二、关闭防火墙 1、三、配置samba 1、四、windows本地映射一、安装 telnet 1、安装必要的软件包yum install -y memcachedyum install -y telnetyum install -y telnet-server2、...
五、skynet 命令行
一、安装 telnet
1、安装必要软件包
yum install -y memcached
yum install -y telnet
yum install -y telnet-server
2、配置修改
vi /etc/xinetd.d/telnet
disable = no二、重启服务
1、超级守护进程
xinetd 提供了访问控制、加强的日志和资源管理功能,已经成了Red Hat 7 和 Mandrake 7.2 的 Internet 标准超级守护进程。它用于管理多种轻量级的 Internet 服务,如 telnet、fp。
[root@localhost /]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ] 2、23端口
telnet 的端口号是23。利用 netstat 检查 是否正常启动。
[root@localhost /]# netstat -tnlp
三、启动 skynet 控制台服务
skynet.newservice("debug_console",8000)
四、telnet 连接
[root@localhost ~]# telnet 127.0.0.1 8000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Welcome to skynet console
telnet 输入 IP 和 端口,看到 "Welcome to skynet console" 就代表连接成功了。然后就可以调用各种命令进行性能分析了。五、skynet 命令行
首先,来看下最简单的命令 help,同时也可以预览下这个控制台究竟有哪些可以用的功能。
help
call call address ...
clearcache clear lua code cache
cmem Show C memory info
debug debug address : debug a lua service
exit exit address : kill a lua service
gc gc : force every lua service do garbage collect
help This help message
info info address : get service infomation
inject inject address luascript.lua
kill kill address : kill service
list List all the service
log launch a new lua service with log
logoff logoff address
logon logon address
mem mem : show memory status
ping ping address
service List unique service
shrtbl Show shared short string table info
signal signal address sig
snax lanuch a new snax service
start lanuch a new lua service
stat Dump all stats
task task address : show service task detail
<CMD OK>
如果命令执行成功,会输出 <CMD OK>。
更多命令可以参见官方wiki:https://github.com/cloudwu/skynet/wiki/DebugConsole
「智能机器人开发者大赛」官方平台,致力于为开发者和参赛选手提供赛事技术指导、行业标准解读及团队实战案例解析;聚焦智能机器人开发全栈技术闭环,助力开发者攻克技术瓶颈,促进软硬件集成、场景应用及商业化落地的深度研讨。 加入智能机器人开发者社区iRobot Developer,与全球极客并肩突破技术边界,定义机器人开发的未来范式!
更多推荐

所有评论(0)