一个人应该如何杀死tezos节点进程?
1 个回答
- 投票数
您应使用" Ctrl + c"(或杀死-15< Process-ID>)来终止tezos节点.这将花费一些时间,因为该节点尝试轻轻地取消所有计划的操作,并使数据库保持一致状态.
" Ctrl + z"(或杀死-19< Process-ID>)只是暂停该过程.您可以通过在同一终端上运行fg
命令(或使用kill -18< PID>)将其恢复.
请注意,您还可以发送SIGKILL信号(kill -9< PID>),该信号将立即终止该过程.但是我不建议这样做,因为它可能会损坏数据库.
最后,您可以使用ps -A | grep tezos-node
.
Your should use "Ctrl+c" (or kill -15 <Process-ID>) to terminate tezos node. This will take some time because the node tries to softly cancel all scheduled actions, and to keep the database in a consistent state.
"Ctrl+z" (or kill -19 <Process-ID>) just pauses the process. You can bring it back by running fg
command in the same terminal (or with kill -18 <PID>).
Note that you can also send a SIGKILL signal (kill -9 <PID>) that will terminate the process immediately. But this is not recommended I think, as it may corrupt the database.
Finally, you can get the PID of your tezos-node process(es) with ps -A | grep tezos-node
.
我有几次发现自己无法重新启动tezos节点,因为我相信我已经结束了该过程,但是当我尝试再次启动它时,我收到以下消息:
最近,我使用Ctrl-C,然后在看不到进度时使用Ctrl-Z.我相信这将流程置于后台,进一步加剧了我的困惑.
我应该使用哪种方法可靠地结束tezos-node进程?如果我不小心将流程放到了后台,是否有办法将其恢复到前台?