Changes

43 bytes removed ,  17:06, 30 April 2013
crtools -> criu
Line 18: Line 18:  
=== Run (isolated) ===
 
=== Run (isolated) ===
   −
Now, if you try to simply run and try to dump such a program, crtools will  fail. The reason is a program you launch from the shell shares some common resources with the shell, notably its session and terminal. Crtools has a built-in check that makes sure there are no such resources.
+
Now, if you try to simply run and try to dump such a program, criu will  fail. The reason is a program you launch from the shell shares some common resources with the shell, notably its session and terminal. Criu has a built-in check that makes sure there are no such resources.
    
To remove the dependency on a current terminal, let's executed our script in a new session and redirect its output to a file:
 
To remove the dependency on a current terminal, let's executed our script in a new session and redirect its output to a file:
Line 36: Line 36:  
Dump it:
 
Dump it:
   −
  # crtools dump -t 2221 -vvv -o dump.log && echo OK
+
  # criu dump -t 2221 -vvv -o dump.log && echo OK
 
  OK
 
  OK
   Line 56: Line 56:  
Restore the test process:
 
Restore the test process:
   −
  # crtools restore -d -t 2221 -vvv -o restore.log && echo OK
+
  # criu restore -d -t 2221 -vvv -o restore.log && echo OK
 
  OK
 
  OK
   Line 64: Line 64:  
For that we need to execute our test script or another program (e.g. "top") from a terminal without any redirection.
 
For that we need to execute our test script or another program (e.g. "top") from a terminal without any redirection.
   −
Note crtools only supports [http://en.wikipedia.org/wiki/Pseudo_terminal Unix98 PTYs].
+
Note criu only supports [http://en.wikipedia.org/wiki/Pseudo_terminal Unix98 PTYs].
    
=== Run ===
 
=== Run ===
Line 75: Line 75:  
=== Dump ===
 
=== Dump ===
   −
Currently crtools doesn't support a stopped task, so "crtools dump" must be executed from another terminal.
+
Currently criu doesn't support a stopped task, so "criu dump" must be executed from another terminal.
   −
  # crtools dump -t 2621
+
  # criu dump -t 2621
 
  (00.012929) Error (tty.c:1022): tty: Found dangling tty with sid 940 pgid 2621 (pts) on peer fd 0. Consider using --shell-job option.
 
  (00.012929) Error (tty.c:1022): tty: Found dangling tty with sid 940 pgid 2621 (pts) on peer fd 0. Consider using --shell-job option.
 
  (00.013111) Error (cr-dump.c:1636): Dumping FAILED.
 
  (00.013111) Error (cr-dump.c:1636): Dumping FAILED.
   −
See, crtools asks to set the <code>--shell-job</code>, because we try to dump only a part of a session and a slave end of a tty pair. It is a common rule to ask a user, if only a part of something is dumped.
+
See, criu asks to set the <code>--shell-job</code>, because we try to dump only a part of a session and a slave end of a tty pair. It is a common rule to ask a user, if only a part of something is dumped.
   −
  # crtools dump -vvvv -o dump.log -t 2621 --shell-job && echo OK
+
  # criu dump -vvvv -o dump.log -t 2621 --shell-job && echo OK
 
  OK
 
  OK
    
=== Restore ===
 
=== Restore ===
   −
  $ ~/crtools/crtools restore -vvvv -o restore.log -t 2621 --shell-job
+
  # criu restore -vvvv -o restore.log -t 2621 --shell-job
 
  Fri Apr 12 12:41:09 MSK 2013
 
  Fri Apr 12 12:41:09 MSK 2013
 
  Fri Apr 12 12:41:10 MSK 2013
 
  Fri Apr 12 12:41:10 MSK 2013
    
[[Category:HOWTO]]
 
[[Category:HOWTO]]