Home > Erlang探索, 源码分析 > Recon-Erlang线上系统诊断工具


February 27th, 2014 Leave a comment Go to comments

原创文章,转载请注明: 转载自系统技术非业余研究

本文链接地址: Recon-Erlang线上系统诊断工具

Erlang系统素以稳定可靠闻名,但是它也是c实现的,也是要管理比如内存,锁等等复杂的事情,也会出现Crash,而且crash的时候大部分原因是因为内存问题。为此erlang运行期提供了强大的自省机制,帮忙用户诊断问题。自省机制过于强大,而且大部分的信息是散落在各处的,不是太资深的用户很难总体把握,而且线上系统读取这些信息的时候,也要考虑对系统的影响。 这时候recon来帮忙了, 源码在这里


Recon wants to be a set of tools usable in production to diagnose Erlang problems or inspect production environment safely.

它的作者Ferd就是 Learn You Some Erlang for great good! 书的作者(中文版我在翻译)参见:http://learnyousomeerlang.com/
Ferd同学素以讲解事情深入简出为最大特点,思路特别清晰,目前就职于Heroku, 负责开发logplex项目,而Recon就是在运维logplex时候吃自己狗粮的时候的产物,参见这篇文章的描述,非常有技术含量的分析,特别的分析了erlang内存分配器的工作原理,如何观察,提高内存分配率。

回到Recon, 它的文档非常清晰,见这里


Main module, contains basic functionality to interact with the recon application. It includes functions to gather information about processes and the general state of the virtual machine, ports, and OTP behaviours running in the node. It also includes a few functions to facilitate RPC calls with distributed Erlang nodes.

Regroups useful functionality used by recon when dealing with data from the node. Would be an interesting place to look if you were looking to extend Recon’s functionality

Regroups functions to deal with Erlang’s memory allocators, or particularly, to try to present the allocator data in a way that makes it simpler to discover the presence of possible problems.

和一系列脚本用于在发生crashdump的时候帮助用户分析到原因, 设计的时候充分考虑到了对系统的最小影响,在线上使用是很安全的。

其中最有价值的是 recon_alloc, 基本上把内存分配器的细节和复杂都屏蔽起来,用户可以很好的看到内存工作的效率.

allocators (1)



注: Recon新版本Provides production-safe tracing facilities, to dig into the execution of programs and function calls as they are running. 参见 这里

Post Footer automatically generated by wp-posturl plugin for wordpress.

Categories: Erlang探索, 源码分析 Tags:
  1. cba
    February 27th, 2014 at 15:08 | #1

    终于又有Learn You Some Erlang for great good!的消息了。目前进度如何,霸爷预计几月份能出来呢?


  2. chad
    February 27th, 2014 at 16:19 | #2

    期待Learn You Some Erlang for great good!中文版


  3. pampa
    March 24th, 2014 at 12:12 | #3



  4. pampa
    March 24th, 2014 at 12:17 | #4

    for the Chinese version ,anything needs getting part in?


  5. genesislive
    April 27th, 2014 at 23:00 | #5

    看上去是不错的工具,期待翻译的Learn You Some Erlang for great good!中文版。


  6. leeyi
    January 15th, 2015 at 11:04 | #6

    Learn You Some Erlang for great good! 翻译完了之后,发给我一份呗;


  1. April 27th, 2014 at 13:13 | #1
  2. June 12th, 2014 at 15:37 | #2