CryoPID: hibernation for Linux processes

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.

CryoPID - A Process Freezer for Linux


Recent Entries

Comments

Oldest comments listed first.

Posted by: Max on March 18, 2008 at 9:50 AM

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.


Posted by: Jason Striegel on March 19, 2008 at 8:51 PM

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.


Posted by: Max on March 23, 2008 at 6:58 AM

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.


Posted by: tejas on September 21, 2008 at 6:31 AM

how do we compile cryopid


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

MZ_Jameco-RobotBuild_RR.gif
MZ_DIYMovieMaking-RR.gif
Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif John Park in the Maker Shed: tinyCylon kit build They let me loose in the Maker Shed, so I grabbed a tinyCylon Kit, built it, and embedded it in a busted Nerf gun! More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog