今天无意中发现这个功能。。。
[url]http://ejabberd.jabber.ru/interconnect-erl-nodes[/url]
在下载的 getting_started-5.0.1.pdf 那里也有这个topic:《Advanced Shell Usage - Job Control Mode》,不知道为何官方html格式的文档那里消失了 :?
简单来说是这样,比如节点 foo@192.168.0.2 启动了一个daemon
[quote]erl -name foo@192.168.0.2 -setcookie 123456 -noshell -noinput ...[/quote]
如果要管理它,可以这样:
[quote]# ./start.sh -name bar@192.168.0.3 -setcookie 123456
Erlang (BEAM) emulator version 5.5.4 [source] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.5.4 (abort with ^G)
(bar@192.168.0.3)1>
User switch command
--> h
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s - start local shell
r [node] - start remote shell
q - quit erlang
? | h - this message
--> j
1* {shell,start,[init]}
--> r 'foo@192.168.0.2'
--> j
1 {shell,start,[init]}
2* {'foo@192.168.0.2',shell,start,[]}
--> c 2
Eshell V5.5.4 (abort with ^G)
(foo@192.168.0.2)1> nodes().
['bar@192.168.0.3'][/quote]
比用什么rpc的方便多了 :P
btw:在Windows下可以使用werl,这样就可以使用Ctrl+G了
[url]http://ejabberd.jabber.ru/interconnect-erl-nodes[/url]
在下载的 getting_started-5.0.1.pdf 那里也有这个topic:《Advanced Shell Usage - Job Control Mode》,不知道为何官方html格式的文档那里消失了 :?
简单来说是这样,比如节点 foo@192.168.0.2 启动了一个daemon
[quote]erl -name foo@192.168.0.2 -setcookie 123456 -noshell -noinput ...[/quote]
如果要管理它,可以这样:
[quote]# ./start.sh -name bar@192.168.0.3 -setcookie 123456
Erlang (BEAM) emulator version 5.5.4 [source] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.5.4 (abort with ^G)
(bar@192.168.0.3)1>
User switch command
--> h
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s - start local shell
r [node] - start remote shell
q - quit erlang
? | h - this message
--> j
1* {shell,start,[init]}
--> r 'foo@192.168.0.2'
--> j
1 {shell,start,[init]}
2* {'foo@192.168.0.2',shell,start,[]}
--> c 2
Eshell V5.5.4 (abort with ^G)
(foo@192.168.0.2)1> nodes().
['bar@192.168.0.3'][/quote]
比用什么rpc的方便多了 :P
btw:在Windows下可以使用werl,这样就可以使用Ctrl+G了