erlang性能分析及进程监控工具

本文介绍了Erlang中的性能分析工具,如etop用于实时监控进程,eprof提供深入的函数调用分析,fprof通过文件记录详细信息便于后期分析,以及cprof对函数调用次数的统计。同时提到了Webtool套件,包含appmon、pman、tv和toolbar等模块,用于图形化监控应用、进程和数据存储。
摘要由CSDN通过智能技术生成

Etop

类似top命令,查看erlang进程占用cpu、内存较高的进程

参数:

  node        atom       erlang node
  port        integer    The used port
  accumulate  boolean    If true execution time is accumulated
  lines       integer    Number of displayed processes
  interval    integer    Display update interval in secs
  sort        runtime | reductions | memory | msg_q
  output      graphical | text
  tracing     on | off 
  setcookie   string    

使用举例:

1. 找出cpu占用最高的进程,图形界面输出,每10秒更新一次

> spawn(fun() -> etop:start([{interval,10}, {sort, runtime}]) end).
> etop:stop().

2. 找出内存占用较高进程, 输出进程的数量为20,文本形式输出

> spawn(fun() -> etop:start([{output, text}, {lines, 20},  {sort, memory}]) end).
> etop:stop().

3. 查看远程节点etop:

 > erl -name abc@192.168.17.102 -hidden -s etop -output text -sort memory -lines 20 -node 'test@192.168.17.102' -setcookie mycookie123

或者:

> erl -name abc@192.168.17.102 -hidden
> etop:start([{node,'test@192.168.17.102'}, {setcookie, "mycookie123"}, {output, text}, {lines, 20},  {sort, memory}])

rpc:call

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值