原创作者: mryufeng
阅读:1742次
评论:0条
更新时间:2011-06-01
在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 yum install libpcap-devel
yum install libpcap
编译出错:
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 <time.h>
搞定 运行
[root@test98 erlsnoop-1.0]# ./erlsnoop -hpnkt
Erlsnoop 1.0 (Mar 4 2008)
using interface eth0 (mtu=1500)
using filter "tcp"
option -? gets help
type ^C to quit
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 160
REG_SEND from: #Pid<x@192.168.0.98.11.0.2> to: global_name_server
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 49
MONITOR from: #Pid<x@192.168.0.98.36.0.2> to: net_kernel
ref: #Ref<x@192.168.0.98.46.0.0.2>
[ 192.168.0.243:30141 (y@192.168.0.243) > 192.168.0.98:44683 (x@192.168.0.98) ] 161
REG_SEND from: #Pid<y@192.168.0.243.11.0.2> to: global_name_server
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 84
REG_SEND from: #Pid<x@192.168.0.98.36.0.2> to: net_kernel
效果不错的哦。可以看到erlang的交互信息, 相信的请看README.txt
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 yum install libpcap-devel
yum install libpcap
编译出错:
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 <time.h>
搞定 运行
[root@test98 erlsnoop-1.0]# ./erlsnoop -hpnkt
Erlsnoop 1.0 (Mar 4 2008)
using interface eth0 (mtu=1500)
using filter "tcp"
option -? gets help
type ^C to quit
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 160
REG_SEND from: #Pid<x@192.168.0.98.11.0.2> to: global_name_server
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 49
MONITOR from: #Pid<x@192.168.0.98.36.0.2> to: net_kernel
ref: #Ref<x@192.168.0.98.46.0.0.2>
[ 192.168.0.243:30141 (y@192.168.0.243) > 192.168.0.98:44683 (x@192.168.0.98) ] 161
REG_SEND from: #Pid<y@192.168.0.243.11.0.2> to: global_name_server
[ 192.168.0.98:44683 (x@192.168.0.98) > 192.168.0.243:30141 (y@192.168.0.243) ] 84
REG_SEND from: #Pid<x@192.168.0.98.36.0.2> to: net_kernel
效果不错的哦。可以看到erlang的交互信息, 相信的请看README.txt
评论 共 0 条 请登录后发表评论