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
或者:

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

被折叠的 条评论
为什么被折叠?



