Find the answer to your Linux question:
Results 1 to 2 of 2
Is there a way to suspend the execution of a process and dump its current state (aka necessary memory) to a file, then restore that process at some future point?...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    1

    Process suspend and resume?

    Is there a way to suspend the execution of a process and dump its current state (aka necessary memory) to a file, then restore that process at some future point?

  2. #2
    Just Joined!
    Join Date
    Aug 2007
    Posts
    37
    There's a utility in the Debian repositories called cryopid which does this, but it seems to be a bit hit and miss and the documentation is non-existent. You can read more about it here: CryoPID - A Process Freezer for Linux

    Basically you use the command 'freeze', give it a filename to save the state to and give it the pid of the process that you want to capture. It then saves it as an executable file. If you use the '-l' flag it saves the libraries as well (this may make the file a lot bigger but means that you can restart the process on a different computer). e.g.
    Code:
    freeze filename pid
    freeze -l filename pid
    This trivial example takes a snapshot of a process half way through and then replays it to the end:
    Code:
    for x in {0..100}; do echo $x; if [[ $x == 50 ]]; then freeze freezefile $$; fi; done
    echo "Running freezefile..." 
    ./freezefile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...