[Erlang危机](4.4)命名管道
2015-08-22 09:23
323 查看
原创文章,转载请注明出处:server非业余研究http://blog.csdn.net/erlib 作者Sunface联系邮箱:cto@188.com
Named Pipes
命名管道(Named Pipes)
A little known way to connect with an Erlang node that requires no explicit distribution is through named pipes. This can be done by starting Erlang with run_erl, which wraps Erlang in a named pipe 5:另一种鲜为人知连接Erlang节点的方法:命名管道(named pipes),能够通过使用run_erl 启动Erlang来完毕 (Erlang会被包裹在命名管道内)5。
-------------------------------------------------------------------------------------
$ run_erl /tmp/erl_pipe /tmp/log_dir "erl"
-------------------------------------------------------------------------------------
The first argument is the name of the file that will act as the named pipe. The second one is where logs will be saved 6.
第一个參数是指定作为命名管道的文件。第二个是存放日志的文件夹6。
To connect to the node, you use the to_erl program:
你能够使用 to_erl程序连接到节点上:
-------------------------------------------------------------------------------------
$ to_erl /tmp/erl_pipe
Attaching to /tmp/erl_pipe (^D to exit)
1>
-------------------------------------------------------------------------------------
And the shell is connected. Closing stdio (with ˆD) will disconnect from the shell while leaving it running.
连接上后,你能够使用ctrl+D来断开远程节点(仅仅是断开,不会终结远程节点).
[5] "erl" is the command being run. Additional arguments can be added after it. For example "erl +K true" will turn kernel polling on.
[6] Using this method ends up calling fsync for each piece of output, which may give quite a performance hit if a lot of IO is taking place over standard output.
[注5]:“erl”就是要执行的命令,你也能够其次是其他启动选项,如"erl +K ture"它会打开内核kernel调查。
[注意6] :这种方法最终调用fsync每件作品将同步输出,假设你有大量的IO经营产品,性能急剧下降。
相关文章推荐
- 字符数组与字符指针
- 互联网架构设想的大型应用软件,并建议
- PostgreSQL Replication之第八章 与pgbouncer一起工作(2)
- WinForm程序中两份mdf文件问题的解决
- 开源的c/c++编译器 mingm 编译、执行一段简单的c/c++代码
- postgresql 数据库备份
- HDU 1026(优先队列+BFS+前驱记录)
- 问答Swift2.0-基本运算符、字符串和字符
- 数据结构基础 哈希表 概念篇
- JUnit4基础 使用JUnit4进行单元测试
- C# VS2010中,用微软自带的System.Data.OracleClient来连接Oracle数据
- 我的回忆录-青年
- 树莓派 安装 php
- Spring EL method invocation example
- noip2000计算器的改良 (模拟,解一元一次方程)
- sizeof 和 strlen 的区别
- 代码流程图 插件
- 显示和隐藏Mac隐藏文件的命令
- 解决HttpWebRequest和HtmlAgilityPack采集网页中文乱码问题
- 负数在计算机中的存储