简体   繁体   English

如何编写一个shell脚本来检查点ubuntu中正在运行的进程?

[英]How to write a shell script to checkpoint a running process in ubuntu?

CRIU or any other checkpoint/restore command cannot be used. 无法使用CRIU或任何其他检查点/恢复命令。 I need to be able to restore the process on a different system. 我需要能够在其他系统上还原该过程。

That is what CRIU should be able to do. 这就是CRIU应该能够做到的。 I mean create checkpoint and restore it at another machine. 我的意思是创建检查点并将其还原到另一台计算机上。 See CRIU documentation for container live migration: 有关容器实时迁移的信息,请参阅CRIU文档:

This is the use case from what the whole checkpoint/restore project appeared. 这是整个检查点/还原项目出现时的用例。 Container is checkpointed, then the image is copied on another box, then restored. 检查容器的位置,然后将图像复制到另一个盒子上,然后还原。 From the remote observer point of view the container is just frozen for a while. 从远程观察者的角度来看,容器只是冻结了一段时间。

It is quite challenging to write an application that migrates a process to another machine. 编写将流程迁移到另一台计算机的应用程序是非常具有挑战性的。 It would be necessary to recover process hierarchy, privileges, file descriptors, network connections, signals... 必须恢复进程层次结构,特权,文件描述符,网络连接,信号...

It is too many issues to describe in a single answer. 一个答案中描述的问题太多了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM