1.erlang的配置文件:
erl -boot start_sasl -config elog1
elog1.config文件内容:
[{kernel, [{error_logger, {file, "/home/cas/erlang_log_test/error1.log"}}]},
{sasl, [{sasl_error_logger, {file, "/home/cas/erlang_log_test/sasl1.log" }}]}].
2.erlang的ez包使用例子:
erlang打包命令:zip:create("beamtest.ez", ["beamtest"], [{compress, all},{uncompress,[".beam",".app"]}]).
文件beamtest.ez和目录beamtest必须一致; beamtest目录必须是单独目录。
使用ez包:export ERL_LIBS=/home/cas/ez_test_imp/deps; erl -pa ebin
查看模块信息命令:Module:module_info().
查看载入模块的路径命令:rp(code:get_path()).
3.erlang中统计变量大小的没有公开函数:
erts_debug:size。
参看地址:http://www.erlang.org/doc/efficiency_guide/processes.html
4.mnesia节点集群:
退出集群:mnesia:del_table_copy(schema, 'test2@127.0.0.1').