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:

~/captured_mutt

and in few seconds you’ll get fully workable mutt with all messages indexed etc.

I recommend cryopid, mates, it’s really useful! ;)

 

6 Comments

 

  1. Pingback : resume » CryoPID: Freeze and Unfreeze processes in Linux

  2. October 18, 2007  11:34 pm by Brock Noland Reply

    Wow! I am not sure how I would use this. However, it is exceedingly cool.

  3. October 19, 2007  6:27 am by artiomix Reply

    Thanks for your comment, Brock!



    Actually I was looking for a solution how to save caching DNS server (BIND) lookup database that is saved in RAM when I restart server. I found a cryoPID for this :)

  4. February 9, 2010  7:02 am by Mansi Reply

    hey could anyone pls help me out that can we resume the freezed process in windows?
    Like if I have saved the state of the process on linux(say using CryoPID ) can the process be resumed in windows using this info..
    If yes how?

  5. May 17, 2011  12:40 am by anti depression treatment Reply

    Thanks very a lot for this flawless submit;that is the phrases that retains me on track by way of out the day. I've been looking round to your site after I heard about them from a buddy and was thrilled after I was able to find it after looking for lengthy time. Being a avid blogger, I’m glad to see others taking initivative and contributing to the community. Just needed to remark to point out my appreciation to your web site as it is vitally difficult to do, and many writers do not get credit they deserve. I am sure I’ll visit once more and can unfold the word to my friends.

  6. May 17, 2011  9:55 am by Videochat Reply

    Good day! This post couldn't be written any better! Reading through this post reminds me of my good old room mate! He always kept chatting about this. I will forward this post to him. Fairly certain he will have a good read. Thanks for sharing!

Leave a reply

 

Your email address will not be published.