由于R13B以后, Erlang的分布协议修改了格式, 添加了Atom Cache, erlsnoop在新版本下无法使用, 我特地打了patch, 使得它支持最新的版本,源码在附件中下载.
在erlang的邮件列表上看到:
Have you tried putting a snoop to see whether the delay is on the
sending/receiving side?
This might be useful: http://www.erlang.org/contrib/erlsnoop-1.0.tgz
去http://www.erlang.org/contrib/看了下 模块真不少 下载了erl_snoop
先安装lib-pcap
但是编译出错:
ip.c:77: error: label at end of compound statement
随便在default: 后面加个return 0;
utils.c: In function ‘gmt2local’:
utils.c:26: error: storage size of ‘sgmt’ isn’t known
utils.c:28: warning: implicit declaration of function ‘time’
utils.c:31: error: dereferencing pointer to incomplete type
utils.c:31: warning: implicit declaration of function ‘gmtime’
utils.c:31: error: invalid type argument of ‘unary *’
utils.c:32: warning: implicit declaration of function ‘localtime’
utils.c:32: warning: assignment makes pointer from integer without a cast
utils.c:34: error: dereferencing pointer to incomplete type
utils.c:34: error: dereferencing pointer to incomplete type
utils.c:35: error: dereferencing pointer to incomplete type
utils.c:35: error: dereferencing pointer to incomplete type
utils.c:42: error: dereferencing pointer to incomplete type
utils.c:42: error: dereferencing pointer to incomplete type
utils.c:43: error: dereferencing pointer to incomplete type
utils.c:43: error: dereferencing pointer to incomplete type
utils.c:26: warning: unused variable ‘sgmt’
make: *** [utils.o] Error 1
加个 #include
搞定 运行
[root@test98 erlsnoop-1.0] |
Erlsnoop 1.0 (Mar 4 2008) |
using interface eth0 (mtu=1500) |
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 160 |
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 49 |
[ 192.168.0.243:30141 (y@192.168.0.243) > 192.168.0.98:44683 (x@192.168.0.98) ] 161 |
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 84 |
效果不错的哦。可以看到erlang的交互信息, 相信的请看README.txt
下载erlsnoop-1.1
Erlang/OTP R13B04 has been released. R13B04 is a service release for R13B. There are mostly error corrections, but also some new functionality.
This is the first release after the introduction of the official Git repository at Github and it is amazing to notice that the number of contributions from the community has increased significantly. As many as 32 contributors have provided 1 or more patches each until now, resulting in 51 integrated patches from the open source community in this service release.
In addition to the contributions provided by the community we have the following examples of highlights in the release:
* The documentation can now be built from the source.
* The Native Implemented Functions (NIFs) are still in beta, but much enhanced.
* The garbage collection of binaries is further enhanced.
* Support for user defined prompt in the shell. A small but useful new function.
* Enhanced cross compilation support
*BUG fix版本,细细碎碎的改进了不少. 添加了个lcnt工具
Recent Comments