erlang调试之JCL】的更多相关文章

Job control mode (JCL), in which jobs can be started, stopped, detached or connected. Only the current job can communicate with the shell. 通过JCL,我们可以远程接入一个erlang node,来对其进行访问控制 erlang节点之间通信是需要有互信的,而互信是用cookie来完成,所以要对其他节点进行访问我们需要获得对方cookie 首先我们有一个这样的运…
etop是erlang进程信息查看工具,类似于UNIX的top. 一.配置参数 node The measured node. Value: atom() Mandatory setcookie Cookie to use for the etop node - must be the same as the cookie on the measured node. Value: atom() lines Number of lines (processes) to display. Value…
第一种方式,加打印记录 %%-define(debug, ok). -ifdef(debug). -define(LOG(X), io:format("pid:~p , {~p,~p}: ~p~n", [self(), ?MODULE, ?LINE, X])). -else. -define(LOG(X), true). -endif. 设置LOG的宏定义,调试只要在代码中加入?LOG(Val),就可以 特点是,简单,调试清楚,对代码性能的影响小,也是最常用的方法,就不举例说明了 第二…
Erlang (/ˈɜrlæŋ/ er-lang) is a general-purpose concurrent, garbage-collected programming language and runtime system. The sequential subset of Erlang is a functional language, with strict evaluation, single assignment, and dynamic typing. It was desi…
<Erlang程序设计(第2版)> 基本信息 作者: (瑞典)Joe Armstrong 译者: 牛化成 丛书名: 图灵程序设计丛书 出版社:人民邮电出版社 ISBN:9787115354570 上架时间:2014-5-27 出版日期:2014 年6月 开本:16开 页码:428 版次:2-1 所属分类:计算机 > 软件与程序设计 > 综合 > 高级程序语言设计 更多关于>>><Erlang程序设计(第2版)> 编辑推荐 在多核.并发.分布为王的…
distel可以断点调试erlang,但是步骤非常繁琐 以下面的测试脚本为例说明 geometry.erl -module(geometry). -export([area/1]). area({rectangle,Width,Height})-> Width*Height; area({square,X}) -> X*X; area({circle,R}) -> 3.14159*R*R. 调试步骤如下:(步骤一步都不能少,否则会出问题) 进入distel菜单,选择start new s…
Erlang的shell功能强大,这里我将它当成我的客户端.可以动态的输入你需要发送的内容,也可以动态的接收内容,就像调试器一样,在开发过程中起到很重要的作用.具体使用方式如下: C:\Documents and Settings\Administrator>erl Eshell V5.10.4 (abort with ^G) 1> {ok, Socket} = gen_tcp:connect("localhost", 2000, [binary, {packet, 2}]…
今天需要实时查看目标结点上的相关信息,于是查阅了关于远程Shell使用的资料,最终采用JCL的方式与本机上的erlang结点交互.在使用erl shell时需要指定目标结点的cookie以及当前结点名,才能正确连接到目标结点.比如: erl -name Jack@127.0.0.1 -setcookie xxxxx 注意-name指定的long-name必须包含@,不然会报'Can't set long name, please check your configuration'的错误.然后Ct…
在window中调试的时候我们可以通过启动多个cmd窗口运行Erlang节点,在生产环境中我们需要Erlang服务在Centos服务器上后台运行;这就需要在启动的时候添加启动参数detached来脱离终端:      -detached Starts the Erlang runtime system detached from the system console. Useful for running daemons and backgrounds processes. Implies -n…
http://wenku.baidu.com/link?url=AUQR8Hn-e-fEB_lqjXsd8XfapWj1qAK7J05JoBXFib_LlSk5qSOTia8HIxNV1XkeZi-kHFsH18Qb9NED5PKiPb8h6oDFVR6KG75MUSYAAMm Erlang 学习笔记    一.Erlang语言特征重点  1.catch是返回表达式的值或者错误信息的元组 try…catch是可以捕捉不同的错误类型以及有流程控制  2.发送消息永远不会失败,如果尝试发送消息给一个…