erlang 分布式控制 博客分类: erlang ErlangCouchDB.netJ#C
测试记录:
zdx@couchdb:~$ erl -sname 1 -setcookie 123
Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.4 (abort with ^G)
(1@couchdb)1> nodes().
[]
(1@couchdb)2> net_adm:ping(2).
** exception error
: no function clause matching net_adm:ping(2)
(1@couchdb)3> node().
'1@couchdb'
(1@couchdb)4> nodes().
[]
(1@couchdb)5> net_adm:ping(2@couchdb).
* 1: syntax error
before: '@'
(1@couchdb)5> net_adm:ping('2@couchdb').
pong
(1@couchdb)6> nodes().
['2@couchdb']
(1@couchdb)7>
User switch command
-->
--> j
1* {shell,start,[init]}
--> j
1* {shell,start,[init]}
--> h
--> s
--> s shell
--> s [shell]
Unknown command
--> s shell
--> j
1 {shell,start,[init]}
2 {shell,start,[]}
3 {shell,start,[]}
4* {shell,start,[]}
--> j
1 {shell,start,[init]}
2 {shell,start,[]}
3 {shell,start,[]}
4* {shell,start,[]}
--> c 2
Eshell V5.7.4 (abort with ^G)
(
--> j
1 {shell,start,[init]}
2* {shell,start,[]}
3 {shell,start,[]}
4 {shell,start,[]}
--> c 2
(1@couchdb)2> nodes().
['2@couchdb','3@couchdb']
(1@couchdb)3>
net_adm:ping('4@couchdb').
pong
(1@couchdb)4> nodes().
['2@couchdb','3@couchdb','4@couchdb']
(1@couchdb)5>
zdx@couchdb:~$ erl -sname 2 -setcookie 123
Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll :false]
Eshell V5.7.4 (abort with ^G)
(2@couchdb)1> nodes().
['1@couchdb']
(2@couchdb)2>
User switch command
--> j
1* {shell,start,[init]}
--> j
1* {shell,start,[init]}
--> c 1
(2@couchdb)2> nodes().
['1@couchdb']
(2@couchdb)3>
User switch command
--> r '1@couchdb'
--> r '1@couchdb' shell
--> j
1 {shell,start,[init]}
2 {'1@couchdb',shell,start,[]}
3* {'1@couchdb',shell,start,[]}
--> c 2
Eshell V5.7.4 (abort with ^G)
(1@couchdb)1>
zdx@couchdb:~$ erl -remsh '1@couchdb' -sname 3 -setcookie 123
Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll :false]
Eshell V5.7.4 (abort with ^G)
(1@couchdb)1
> G
(1@couchdb)1>
User switch command
-->
--> j
1* {'1@couchdb',shell,start,[]}
-->
(1@couchdb)4> nodes().
['2@couchdb','3@couchdb','4@couchdb']
(1@couchdb)5>
User switch command
--> j
1 {shell,start,[init]}
2* {shell,start,[]}
3 {shell,start,[]}
4 {shell,start,[]}
--> r 4@couchdb
Unknown command
--> r '4@couchdb'
--> j
1 {shell,start,[init]}
2 {shell,start,[]}
3 {shell,start,[]}
4 {shell,start,[]}
5* {'4@couchdb',shell,start,[]}
--> c 5
Eshell V5.7.4 (abort with ^G)
(4@couchdb)1>
zdx@couchdb:~$ erl -sname 4 -setcookie 123 -detached
zdx@couchdb:~$ erl -setcookie 123
Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.4 (abort with ^G)
1> nodes().
[]
2> net_adm:ping().
** exception error: undefined function net_adm:ping/0
3> net_adm:ping('1@couchdb').
pang
4> nodes().
[]
5> net_adm:ping('nonode@nohost').
pang
6>
推荐阅读
-
erlang 分布式控制 博客分类: erlang ErlangCouchDB.netJ#C
-
CouchDB 实现原理 博客分类: Database CouchDBREST数据结构Erlang中间件
-
erlang的优秀之处 博客分类: tech ErlangHaskellPythonCouchDB设计模式
-
Erlang学习告一段落 博客分类: Erlang ErlangHBase云计算CouchDBSQLite
-
Nitrogen web framework 入门 博客分类: Erlang WebErlangRailsASP.netCouchDB
-
CouchDB了解(-) 特性及实现 博客分类: Erlang CouchDB数据结构jsonErlangJavaScript
-
ErLang / Python Web 的类似CGI/FastCGI模式 博客分类: Web ErlangPythonCGIWeb设计模式
-
ErLang语法提要 博客分类: Design ErlangHaskell编程FP算法
-
ErLang Map 函数的尾递归形式 / Final List 博客分类: Design Erlang
-
对Riak Core的探索 (1) Hello 博客分类: 我的备忘录Erlang erlangriak_coredynamo