erlang的erl_crash.dump产生以及如何解读

正常情况下 当erlang进程发生错误没有catch的时候 emulator就会自动产生erl_crash.dump,来提供crash的时候的emulator最详细的情况,类似于unix的core dump. 其中下边几个env变量控制dump产生的行为:
ERL_CRASH_DUMP
If the emulator needs to write a crash dump, the value of this variable will be the file name of the crash dump file. If the variable is not set, the name of the crash dump file will be erl_crash.dump in the current directory.
ERL_CRASH_DUMP_NICE
Unix systems: If the emulator needs to write a crash dump, it will use the value of this variable to set the nice value for the process, thus lowering its priority. The allowable range is 1 through 39 (higher values will be replaced with 39). The highest value, 39, will give the process the lowest priority.
ERL_CRASH_DUMP_SECONDS
Unix systems: This variable gives the number of seconds that the emulator will be allowed to spend writing a crash dump. When the given number of seconds have elapsed, the emulator will be terminated by a SIGALRM signal.
除了被动产生dump以外, 用户还可以主动产生dump 方法有2种:
1.  erl控制台 CTRL+C  然后+A
2. kill -s SIGUSR1 erlpid

产生的erl_crash.dump是个纯文本, 可能非常大,特别是你有成千上万的process和port什么的,对于系统调优有非常大的意义。

察看方式参见文档 erl5.5.5/erts-5.5.5/doc/html/crash_dump.html 请注意内存使用有的是byte  有的是WORD.

更方便的是用工具 webtool 来察看 web界面 比较直观。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
这个问题的原因是RabbitMQ在写Crash dump时遇到了问题,路径指向了Windows系统的C盘用户文件夹。根据引用和引用的内容,你可能遇到了安装路径或文件名的问题。请尝试按照以下步骤解决该问题: 1. 检查RabbitMQ的安装路径,确保路径中没有空格或特殊字符。根据引用中的建议,你可以将安装路径改为"/usr/local/Cellar/rabbitmq/3.8.9_1",然后执行"source .zshrc"命令。 2. 检查Erlang和RabbitMQ的版本兼容性。根据引用中的说明,RabbitMQ的版本和Erlang的版本需要匹配。你可以在RabbitMQ的官方网站上查看版本兼容性信息,确认你的Erlang版本是否在兼容范围内。 3. 如果你已经更改了安装路径或文件名,请确保在".zshrc"文件中更新了相关的路径。然后执行"source .zshrc"命令使更改生效。 4. 最后,再次执行"sudo rabbitmq-server -detached"命令,看看是否还现相同的错误消息。 希望这些步骤能够帮助你解决问题。如果问题仍然存在,请提供更多的详细信息,以便我们可以进一步帮助你解决。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【启用rabbitmq遇到的问题全】command not found /Crash dump is being written to: erl_crash.dump...done](https://blog.csdn.net/weixin_51349493/article/details/123183441)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [Erlang报错Crash dump is being written to: erl_crash.dump...done](https://blog.csdn.net/weixin_67851823/article/details/127531792)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值