我如何找出运行erlang进程的哪个节点? [英] How do I found out which node an erlang process is running on?
本文介绍了我如何找出运行erlang进程的哪个节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
erlang:process_info(Pid)
似乎没有该信息。 / p>
谢谢。
解决方案
节点(Arg) - > Node
返回Arg所在的节点。 Arg可以是pid,引用或端口。如果本地节点不存在,则返回nonode @ nohost。
Given that I can send PIDs from a process to an other, even across nodes, if I receive a Pid from a process within a different process (possibly on a different node) how do I find out which node the PID in question runs in/on?
erlang:process_info(Pid)
does not seem to have that information in it.
Thanks.
解决方案
node(Arg) -> Node
Returns the node where Arg is located. Arg can be a pid, a reference, or a port. If the local node is not alive, nonode@nohost is returned.
这篇关于我如何找出运行erlang进程的哪个节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文