在远程 shell 中运行报告浏览器 (rb) 以获取 SASL 错误报告
各位,我们现在部署了很多 Erlang 实例,我们看到了错误,并想检查它们...
通常我们使用远程 shell 连接到正在运行的实例,并以这种方式访问 Erlang 控制台,但这并不对于 rb 或错误消息不起作用...
如何在不删除服务器、不分离启动服务器并查看 shell 的情况下远程访问我的 SASL 错误消息?
Folks we are now delploying a lot of Erlang instances and we are seeing bugs been thrown and would like to examine them...
Normally we connect to the running instance with a remote shell and get access to an Erlang console that way, but this doesn't work for rb or error messages...
How do I get remote access to my SASL error messages without dropping the server, starting it non-detached and looking at the shell?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在 R11B 中遇到了这个问题,最终创建了一个在远程 shell 上工作的 rb 克隆(http://github.com/archaelus/erms/blob/master/src/erms_rb.erl)。诀窍是发现<的group_leader a href="http://github.com/archaelus/erms/blob/master/src/erms_rb.erl#L161" rel="nofollow noreferrer">调用者 然后 将输出发送到那里。
我也许应该整理一下并将其作为补丁提交给 rb。
I ran into this back in R11B and ended up creating a clone of rb that works over a remote shell (http://github.com/archaelus/erms/blob/master/src/erms_rb.erl). The trick is to discover the group_leader of the caller and then send output there.
I should probably tidy that up and submit it as a patch to rb.
我通过 -remsh (
${ROOTDIR}/bin/erl -name shell@${NODE_IP} -remsh ${NODE_NAME}
) 启动远程 shell。一旦在那里,我将 rb_server group_leader 设置为 shell 的当前 group_leader,并且 rb 从此将其输出打印到活动 shell:编辑:为了方便起见,将其封装在函数中:
问候,
汤姆
I start my remote shell via -remsh (
${ROOTDIR}/bin/erl -name shell@${NODE_IP} -remsh ${NODE_NAME}
). once there I set the rb_server group_leader to the current group_leader of the shell and rb henceforth prints its output to the active shell:EDIT: encapsulate it in a function for convenience:
regards,
Tom
我没有使用过 rb,所以我对此不太了解,但也许这会对您有所帮助:
您可以设置 SASL 错误报告处理程序以写入磁盘,请参阅 http://www.erlang.org/doc/man/sasl_app.html :
值
是一of:...
在错误记录器中安装
sasl_report_file_h
。这使得所有报告都转到文件FileName
。FileName
是一个字符串。...
我还依稀记得有一种方法可以安装自定义处理程序回调,但不幸的是,我现在似乎找不到它。
I haven't used rb, so I don't know much about it, but maybe this will help you anyway:
You can set SASLs error report handler to write to disk, see http://www.erlang.org/doc/man/sasl_app.html :
Value
is one of:...
Installs
sasl_report_file_h
in the error logger. This makes all reports go to the fileFileName
.FileName
is a string....
I also dimly remember there being a way to install a custom handler callback, but I can't seem to find it right now, unfortunately.