criu 热迁移进程示例

Dump a process

To dump a process, run:

where,
-D : directory to save image files
-t : PID of process to dump

Convert criu images to core dump

Continuing with the examples above where we dumped the process with PID 1234, we can generate the core dump with the crit utility that comes with criu:

where,
-i : input directory with criu images
-o : output directory for the core dump

To find the generate core dump file:

Check the information with readelf:

Start debugging with GDB:

Resume the process

To resume a process from dump files:

where,
-d : detach criu from the process after resume

 

 

测试:

脚本 a.php

启动:

dump:

restore:

截屏:

参考:

Dump, debug, resume process with criu

留下评论

邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据