CryoPID is an application that allows you to capture the state of a running process in Linux and save it to a file. You can use this file to resume the process later on, either after a reboot or even on another machine. Both x86 and x86_64 are supported and you can get sources for these platforms accordingly here and here. Ubuntu users can use aptitude or apt-get to install this utility (
sudo aptitude install cryopid).
After installation program freeze will be available allowing you to suspend process(es) into a file(s) and resume them later. The file you capture process’ state to is self-executing, so to resume process it’s enough to run that file.
One of the major features is that fact that freeze can be run by regular user (not root) and doesn’t need any kernel modifications.
Here is common cryopid usage example: let’s imagine you use MUTT that has thousands e-mails indexed that you don’t want to be closed and re-indexed. But at the same time you may want to start some application that consumes much memory but it seems that mutt along with this application will exhaust ALL ram. In this case the simplest way is to suspend mutt with cryopid, run that memory consuming application and resume mutt when it’s finished.
To find out PID of mutt process run:
ps ax | grep [e]volution
It should show something like this:
26410 ? Ssl 0:16 mutt
where 26410 is needed PID.
Now you can suspend mutt by cryopid:
freeze ~/captured_mutt 26410
After mutt state is stored, close mutt. To restore mutt, run:
and in few seconds you’ll get fully workable mutt with all messages indexed etc.
I recommend cryopid, mates, it’s really useful!