We're all familiar with the hibernate/deep-sleep features that are typical on your standard laptop. In this mode, the entire contents of RAM are written to the disk and the machine is completely shut down. When it's next booted, the system is restored to the exact state it was at before sleep, with all of your programs running just like they were when you left them.
What if you could do this at the process level? You could kill whatever umpteen-gazillion applications you have running, reboot your computer, and then start your apps back up whenever you like and they would be exactly the way they were when you left them.
There's a Linux application called CryoPID which attempts to do just that.
CryoPID requires no special kernel modifications and operates in user mode, so you don't need to be root. All you do is run the freeze program on a process you own:
freeze /tmp/savestatefile 1234
This will archive the state of process 1234 into a self-executing, compressed file named /tmp/savestatefile. To start it back up, just run the save file:
/tmp/savestatefile
When this is executed, your application will be restored, relinked to any previously-loaded DLLs, and attached to the file descriptors it had open.
You'll run into some problems with network socket connections you had open, and support for X applications is still only experimental, so the useful scenario is a bit limited, but it's a promising concept and could come in quite handy in the command-line world.




































This would be a fantastic tool to have. Especially for simulation jobs that take unexpectedly long to run, don't have checkpointing, have run for a while and now, oops, the server needs to be rebooted.
UNFORTUNATELY the last version is from 2005 and neither compiles nor works on any recent Linux version.
Reply to this comment
Odd. It's supposed to work with 2.6. Maybe there's been a library header or something that's been tweaked recently. Most of the code seems pretty straightforward. Have you taken a stab at porting it to compile under your kernel version?
It's so odd that this project isn't better maintained. It's such a cool and useful utility.
Reply to this comment
I could not get it to compile. Since 2005 a lot of internal linux kernel stuff has changed. Porting it is thus beyond my capabilities. I tried emailing the author but cannot get a reply. The development email list archives are full of people whining about compile problems. They then go quiet after not getting replies.
And yes, I would definitely love this tool to work. Had if had worked, it would have saved the day a few times for me already.
Reply to this comment
how do we compile cryopid
Reply to this comment