[Erlang 0057] Erlang 排错利器: Erlang Crash Dump Viewer

http://www.cnblogs.com/me-sa/archive/2012/04/28/2475556.html

Erlang Crash Dump Viewer真的是排错的天兵神器,还记得我们之前曾经讨论过[Erlang 0013]抓取Erlang进程运行时信息 [Erlang 0012]Erlang Process input queue ,下面是我梳理的"How to interpret the Erlang crash dumps"的文档;

很多人在问有什么工具可以打开crash_dump文件?或者分析crash_dump文件,其实相当简单,一句命令即可:


1

2

1> crashdump_viewer:start().

WebTool is available at http://localhost:8888/

  

Google Reader停了,YUNIO免费服务也停了,这年头没有什么服务是靠谱的,说停就停,下面的链接全是失效了,我重新上传了一份:

http://files.cnblogs.com/me-sa/Erlang_Crash_Dump.pdf

用recon的erl_crashdump_analyzer.sh使用方法如下:

项目地址:  https://github.com/ferd/recon/blob/master/script/erl_crashdump_analyzer.sh


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

$ ./recon/script/erl_crashdump_analyzer.sh erl_crash.dump

 analyzing erl_crash.dump, generated on: Thu Apr 17 18:34:53 2014

 Slogan: eheap_alloc: Cannot allocate 2733560184 bytes of memory

 (of type "old_heap").

 Memory:

 ===

 processes: 2912 Mb

 processes_used: 2912 Mb

 system: 8167 Mb

 atom: 0 Mb

 atom_used: 0 Mb

 binary: 3243 Mb

 code: 11 Mb

 ets: 4755 Mb

 ---

 total: 11079 Mb

 Different message queue lengths (5 largest differen t):

 ===

 1 5010932

 2 159

 5 158

 49 157

 4 156

 Error logger queue length:

 ===

 0

 File descriptors open:

 ===

 UDP: 0

 TCP: 19951

 Files: 2

 ---

 Total: 19953

 Number of processes:

 ===

 36496

 Processes Heap+Sta ck memo ry siz es (wor ds) us ed in the VM (5 largest

 different):

 ===

 1 284745853

 1 5157867

 1 4298223

 2 196650

 12 121536

 Processes OldHeap memory sizes (words) used in the VM (5 largest

 different):

 ===

 3 318187

 9 196650

 14 121536

 64 75113

 15 46422

 Process States when crashing (sum):

 ===

 1 Garbing

 74 Scheduled

 36421 Waiting

------------------------------------------------------------

  

官方地址是:http://www.erlang.org/doc/apps/erts/crash_dump.html

时间: 2024-08-27 12:26:40

[Erlang 0057] Erlang 排错利器: Erlang Crash Dump Viewer的相关文章

[Erlang 0127] Term sharing in Erlang/OTP 上篇

之前,在 [Erlang 0126] 我们读过的Erlang论文 提到过下面这篇论文: On Preserving Term Sharing in the Erlang Virtual Machine 地址: http://user.it.uu.se/~kostis/Papers/erlang12_sharing.pdf  摘要:In this paper we describe our experiences and argue through examples why ?attening t

[Erlang 0128] Term sharing in Erlang/OTP 下篇

继续昨天的话题,昨天提到io:format对数据共享的间接影响,如果是下面两种情况恐怕更容易成为"坑", 呃,恰好我都遇到过; 如果是测试代码是下面这样,得到的结果会是怎样?猜! s2()-> L=[1,2,3,4,5,6], L2=[L,L,L,L], erlang:display( {{erts_debug:size(L),erts_debug:flat_size(L)},{erts_debug:size(L2),erts_debug:flat_size(L2)}} ). 结

Erlang基础 -- 介绍 -- 历史及Erlang并发

前言 最近在总结一些Erlang编程语言的基础知识,拟系统的介绍Erlang编程语言,从基础到进阶,然后再做Erlang编程语言有意思的库的分析. 其实,还是希望越来越多的人关注Erlang,使用Erlang,壮大Erlang编程语言的社区. 说实话,我也没这么高尚,就是看到很多人对Erlang编程语言的误解,Erlang编程语言社区的凋零,招个Erlang开发难之又难,才萌生此念. 这次主要介绍Erlang编程语言.包括Erlang的简要历史以及应用场景,Erlang并发编程,Erlang编程

Procedures to enable crash dump in windows server

Right click ‘Computer’ and select ‘Properties’; Click the ‘Advanced system settings’ and in the dialog tab of ‘Advanced’ click button ‘Environment Variables…’; Click ‘New…’ to add a new variable ‘DEBUG_ENV’ set value as 1; Click ‘OK’ and then close a

[Erlang 0109] From Elixir to Erlang Code

Elixir代码最终编译成为erlang代码,这个过程是怎样的?本文通过一个小测试做下探索. 编译一旦完成,你就看到了真相 Elixir代码组织方式一方面和Erlang一样才用非常扁平的代码模块结构,另一方面Elixir同时支持嵌套.Elixir比较方便的一点是可以在Elixir Shell中完成对模块的定义.看下面的方式: iex> defmodule Math do ...> def sum(a, b) do ...> a + b ...> end ...> end ie

erlang字符串动态解析成为Erlang数据结构(去掉“”)

Eshell V5.8.2 (abort with ^G)1> {ok, Scan1, _} = erl_scan:string("[a,b,c].").{ok,[{'[',1},{atom,1,a},{',',1},{atom,1,b},{',',1},{atom,1,c},{']',1},{dot,1}],1}2> {ok,P}=erl_parse:parse_exprs(Scan1).{ok,[{cons,1,{atom,1,a},{cons,1,{atom,1,b}

【性能诊断】九、并发场景的性能分析(windbg案例,Fist Chance Exception/Crash dump)

经常会碰到这样的场景,自测及单单点的测试时没有任何问题,但在并发环境或生产环境下有时出现没规律的异常.报错等情况.在代码中增加日志是其中一种解决方式:抓取指定异常时的dump,通过windbg也可以快速定位问题. Procdump命令示例:procdump -ma -e 1 –f SqlException w3wp.exe 貌似ProcDump无法抓取Crash的dump文件,看来有时还得回归到windbg带的命令行---adplus adplus -crash -pn w3wp.exe -fu

Adplus 抓取Crash Dump

本实例在win8.1 安装window kits https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit 1:cmd (管理员模式)定位到 adplus.exe 所在目录 cd C:\Program Files\Windows Kits\8.1\Debuggers\x64\ 2:挂起进程 adplus.exe -p 19212 -crash -FullOnFirst -o D:\FolderToStore

编写的windows程序,崩溃时产生crash dump文件的办法

一.引言 dump文件是C++程序发生异常时,保存当时程序运行状态的文件,是调试异常程序重要的方法,所以程序崩溃时,除了日志文件,dump文件便成了我们查找错误的最后一根救命的稻草.windows程序产生dump文件和linux程序产生dump文件的方式不一样,linux默认是不让产生core dump文件,只要在用户自己的~/.bash_profile文件中增加 ulimit -S -c unlimited > /dev/null 2>&1 这样程序崩溃就可以产生可调试的core d