Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个关于 Erlang 的问题。 我怎么知道 Erlang 梁在哪个核心上运行? 或者,如果您提供 pid,是否有任何 Linux 命令可以告诉核心进程在哪里运行?顶 能工作吗?但我不想以交互方式观察它。我可以通过一个命令行提取信息会更好。例如: 这可以工作,但我不知道如何添加 SMP 信息,即在哪个核心上...... 或者,我可以使用ps,我不知道...... 你能帮我吗? 提前谢谢你:) Brs, Ruan top -b -n 1 -p <beam_pid>
top -b -n 1 -p <beam_pid>
伙计们,我找到了两种可行的方法。 1) ps -Ao user,pid,psr,cmd,这可用于查看 pid 的 SMP 信息。 2)这种方法需要额外的步骤。首先,运行top并添加字段P。然后点击W将顶部配置文件保存为~/.toprc. 因此,我们可以运行top -b -n 1 -p <pid>以显示某个 pid 的 SMP 信息。 这些方法适用于 CentOS,但不适用于 OSX……仍然欢迎任何好主意:)
ps -Ao user,pid,psr,cmd
top
P
W
~/.toprc
top -b -n 1 -p <pid>