Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
f466f811
Commit
f466f811
authored
Mar 17, 2023
by
zhul
🌵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除代码中 criu 相关内容
parent
1859290d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
68 deletions
+76
-68
criu.txt
Documentation/criu.txt
+52
-52
Makefile
Makefile
+1
-1
Makefile.install
Makefile.install
+1
-1
crtools.c
criu/arch/x86/crtools.c
+4
-0
crtools.c
criu/crtools.c
+17
-13
cr_options.h
criu/include/cr_options.h
+1
-1
No files found.
Documentation/criu.txt
View file @
f466f811
CR
IU
(8)
CR
BK
(8)
=======
=======
include::footer.txt[]
include::footer.txt[]
NAME
NAME
----
----
cr
iu
- checkpoint/restore in userspace
cr
bk
- checkpoint/restore in userspace
SYNOPSIS
SYNOPSIS
--------
--------
*cr
iu
* 'command' ['option' ...]
*cr
bk
* 'command' ['option' ...]
DESCRIPTION
DESCRIPTION
-----------
-----------
*cr
iu
* is a tool for checkpointing and restoring running applications.
*cr
bk
* is a tool for checkpointing and restoring running applications.
It does this by saving their state as a collection of files (see the *dump*
It does this by saving their state as a collection of files (see the *dump*
command) and creating equivalent processes from those files (see the *restore*
command) and creating equivalent processes from those files (see the *restore*
command). The restore operation can be performed at a later time,
command). The restore operation can be performed at a later time,
...
@@ -54,7 +54,7 @@ The following levels are available:
...
@@ -54,7 +54,7 @@ The following levels are available:
above plus lots of debug.
above plus lots of debug.
*--config* 'file'::
*--config* 'file'::
Pass a specific configuration file to cr
iu
.
Pass a specific configuration file to cr
bk
.
*--no-default-config*::
*--no-default-config*::
Forbid parsing of default configuration files.
Forbid parsing of default configuration files.
...
@@ -66,7 +66,7 @@ The following levels are available:
...
@@ -66,7 +66,7 @@ The following levels are available:
Write logging messages to 'file'.
Write logging messages to 'file'.
*--display-stats*::
*--display-stats*::
During dump as well as during restore *cr
iu
* collects information
During dump as well as during restore *cr
bk
* collects information
like the time required to dump or restore the process or the
like the time required to dump or restore the process or the
number of pages dumped or restored. This information is always
number of pages dumped or restored. This information is always
written to the files 'stats-dump' and 'stats-restore' and can
written to the files 'stats-dump' and 'stats-restore' and can
...
@@ -146,9 +146,9 @@ The following levels are available:
...
@@ -146,9 +146,9 @@ The following levels are available:
*pre-dump*
*pre-dump*
~~~~~~~~~~
~~~~~~~~~~
Performs the pre-dump procedure, during which *cr
iu
* creates a snapshot of
Performs the pre-dump procedure, during which *cr
bk
* creates a snapshot of
memory changes since the previous *pre-dump*. Note that during this
memory changes since the previous *pre-dump*. Note that during this
*cr
iu
* also creates the fsnotify cache which speeds up the *restore*
*cr
bk
* also creates the fsnotify cache which speeds up the *restore*
procedure. *pre-dump* requires at least *-t* option (see *dump* below).
procedure. *pre-dump* requires at least *-t* option (see *dump* below).
In addition, *page-server* options may be specified.
In addition, *page-server* options may be specified.
...
@@ -170,7 +170,7 @@ Performs a checkpoint procedure.
...
@@ -170,7 +170,7 @@ Performs a checkpoint procedure.
+
+
Note if task is about to run after been checkpointed, it can modify
Note if task is about to run after been checkpointed, it can modify
TCP connections, delete files and do other dangerous actions. Therefore,
TCP connections, delete files and do other dangerous actions. Therefore,
*cr
iu
* can not guarantee that the next *restore* action will succeed.
*cr
bk
* can not guarantee that the next *restore* action will succeed.
Most likely if this option is used, at least the file system snapshot
Most likely if this option is used, at least the file system snapshot
must be made with the help of *post-dump* action script.
must be made with the help of *post-dump* action script.
+
+
...
@@ -202,7 +202,7 @@ In other words, do not use it unless really needed.
...
@@ -202,7 +202,7 @@ In other words, do not use it unless really needed.
*--external dev[*'major'*/*'minor'*]:*'name'::
*--external dev[*'major'*/*'minor'*]:*'name'::
Allow to dump a mount namespace having a real block device mounted.
Allow to dump a mount namespace having a real block device mounted.
A block device is identified by its 'major' and 'minor' numbers,
A block device is identified by its 'major' and 'minor' numbers,
and *cr
iu
* saves its information to image under the identifier 'name'.
and *cr
bk
* saves its information to image under the identifier 'name'.
*--external file[*'mnt_id'*:*'inode'*]*::
*--external file[*'mnt_id'*:*'inode'*]*::
Dump an external file, i.e. an opened file that is can not be resolved
Dump an external file, i.e. an opened file that is can not be resolved
...
@@ -215,7 +215,7 @@ In other words, do not use it unless really needed.
...
@@ -215,7 +215,7 @@ In other words, do not use it unless really needed.
returned by *stat*(2).
returned by *stat*(2).
*--external unix[*'id'*]*::
*--external unix[*'id'*]*::
Tell *cr
iu
* that one end of a pair of UNIX sockets (created by
Tell *cr
bk
* that one end of a pair of UNIX sockets (created by
*socketpair*(2)) with 'id' is OK to be disconnected.
*socketpair*(2)) with 'id' is OK to be disconnected.
*--freeze-cgroup*::
*--freeze-cgroup*::
...
@@ -223,12 +223,12 @@ In other words, do not use it unless really needed.
...
@@ -223,12 +223,12 @@ In other words, do not use it unless really needed.
*--manage-cgroups*::
*--manage-cgroups*::
Collect cgroups into the image thus they gonna be restored then.
Collect cgroups into the image thus they gonna be restored then.
Without this option, *cr
iu
* will not save cgroups configuration
Without this option, *cr
bk
* will not save cgroups configuration
associated with a task.
associated with a task.
*--cgroup-props* 'spec'::
*--cgroup-props* 'spec'::
Specify controllers and their properties to be saved into the
Specify controllers and their properties to be saved into the
image file. *cr
iu
* predefines specifications for common controllers,
image file. *cr
bk
* predefines specifications for common controllers,
but since the kernel can add new controllers and modify their
but since the kernel can add new controllers and modify their
properties, there should be a way to specify ones matched the kernel.
properties, there should be a way to specify ones matched the kernel.
+
+
...
@@ -249,7 +249,7 @@ their properties.
...
@@ -249,7 +249,7 @@ their properties.
+
+
Note the format: double quotes, spaces and new lines are required.
Note the format: double quotes, spaces and new lines are required.
The 'strategy' specifies what to do if a controller specified already
The 'strategy' specifies what to do if a controller specified already
exists as a built-in one: *cr
iu
* can either *merge* or *replace* such.
exists as a built-in one: *cr
bk
* can either *merge* or *replace* such.
+
+
For example, the command line for the above example should look like this:
For example, the command line for the above example should look like this:
+
+
...
@@ -264,10 +264,10 @@ For example, the command line for the above example should look like this:
...
@@ -264,10 +264,10 @@ For example, the command line for the above example should look like this:
*--cgroup-dump-controller* 'name'::
*--cgroup-dump-controller* 'name'::
Dump a controller with 'name' only, skipping anything else that was
Dump a controller with 'name' only, skipping anything else that was
discovered automatically (usually via */proc*). This option is
discovered automatically (usually via */proc*). This option is
useful when one needs *cr
iu
* to skip some controllers.
useful when one needs *cr
bk
* to skip some controllers.
*--cgroup-props-ignore-default*::
*--cgroup-props-ignore-default*::
When combined with *--cgroup-props*, makes *cr
iu
* substitute
When combined with *--cgroup-props*, makes *cr
bk
* substitute
a predefined controller property with the new one shipped. If the option
a predefined controller property with the new one shipped. If the option
is not used, the predefined properties are merged with the provided ones.
is not used, the predefined properties are merged with the provided ones.
...
@@ -276,7 +276,7 @@ For example, the command line for the above example should look like this:
...
@@ -276,7 +276,7 @@ For example, the command line for the above example should look like this:
*--skip-in-flight*::
*--skip-in-flight*::
This option skips in-flight TCP connections. If any TCP connections
This option skips in-flight TCP connections. If any TCP connections
that are not yet completely established are found, *cr
iu
* ignores
that are not yet completely established are found, *cr
bk
* ignores
these connections, rather than errors out.
these connections, rather than errors out.
The TCP stack on the client side is expected to handle the
The TCP stack on the client side is expected to handle the
re-connect gracefully.
re-connect gracefully.
...
@@ -312,7 +312,7 @@ For example, the command line for the above example should look like this:
...
@@ -312,7 +312,7 @@ For example, the command line for the above example should look like this:
*-j*, *--shell-job*::
*-j*, *--shell-job*::
Allow one to dump shell jobs. This implies the restored task will
Allow one to dump shell jobs. This implies the restored task will
inherit session and process group ID from the *cr
iu
* itself.
inherit session and process group ID from the *cr
bk
* itself.
This option also allows to migrate a single external tty connection,
This option also allows to migrate a single external tty connection,
to migrate applications like *top*. If used with *dump* command,
to migrate applications like *top*. If used with *dump* command,
it must be specified with *restore* as well.
it must be specified with *restore* as well.
...
@@ -332,7 +332,7 @@ For example, the command line for the above example should look like this:
...
@@ -332,7 +332,7 @@ For example, the command line for the above example should look like this:
By default the option is set to *fpu* and *ins*.
By default the option is set to *fpu* and *ins*.
*--cgroup-root* ['controller':]/'newroot'::
*--cgroup-root* ['controller':]/'newroot'::
Change the root for the controller that will be dumped. By default, *cr
iu
*
Change the root for the controller that will be dumped. By default, *cr
bk
*
simply dumps everything below where any of the tasks live. However, if a
simply dumps everything below where any of the tasks live. However, if a
container moves all of its tasks into a cgroup directory below the container
container moves all of its tasks into a cgroup directory below the container
engine's default directory for tasks, permissions will not be preserved on
engine's default directory for tasks, permissions will not be preserved on
...
@@ -352,7 +352,7 @@ By default the option is set to *fpu* and *ins*.
...
@@ -352,7 +352,7 @@ By default the option is set to *fpu* and *ins*.
Restores previously checkpointed processes.
Restores previously checkpointed processes.
*--inherit-fd* *fd[*'N'*]:*'resource'::
*--inherit-fd* *fd[*'N'*]:*'resource'::
Inherit a file descriptor. This option lets *cr
iu
* use an already opened
Inherit a file descriptor. This option lets *cr
bk
* use an already opened
file descriptor 'N' for restoring a file identified by 'resource'.
file descriptor 'N' for restoring a file identified by 'resource'.
This option can be used to restore an external resource dumped
This option can be used to restore an external resource dumped
with the help of *--external* *file*, *tty*, and *unix* options.
with the help of *--external* *file*, *tty*, and *unix* options.
...
@@ -370,7 +370,7 @@ Note that square brackets used in this option arguments are literals and
...
@@ -370,7 +370,7 @@ Note that square brackets used in this option arguments are literals and
usually need to be escaped from shell.
usually need to be escaped from shell.
*-d*, *--restore-detached*::
*-d*, *--restore-detached*::
Detach *cr
iu
* itself once restore is complete.
Detach *cr
bk
* itself once restore is complete.
*-s*, *--leave-stopped*::
*-s*, *--leave-stopped*::
Leave tasks in stopped state after restore (rather than resuming
Leave tasks in stopped state after restore (rather than resuming
...
@@ -417,12 +417,12 @@ usually need to be escaped from shell.
...
@@ -417,12 +417,12 @@ usually need to be escaped from shell.
*--external macvlan[*'inner_dev'*]:*'outer_dev'::
*--external macvlan[*'inner_dev'*]:*'outer_dev'::
When restoring an image that have a MacVLAN device in it, this option
When restoring an image that have a MacVLAN device in it, this option
must be used to specify to which 'outer_dev' (an existing network device
must be used to specify to which 'outer_dev' (an existing network device
in CR
IU
namespace) the restored 'inner_dev' should be bound to.
in CR
BK
namespace) the restored 'inner_dev' should be bound to.
*--manage-cgroups* ['mode']::
*--manage-cgroups* ['mode']::
Restore cgroups configuration associated with a task from the image.
Restore cgroups configuration associated with a task from the image.
Controllers are always restored in an optimistic way -- if already present
Controllers are always restored in an optimistic way -- if already present
in system, *cr
iu
* reuses it, otherwise it will be created.
in system, *cr
bk
* reuses it, otherwise it will be created.
The 'mode' may be one of the following:
The 'mode' may be one of the following:
...
@@ -432,7 +432,7 @@ The 'mode' may be one of the following:
...
@@ -432,7 +432,7 @@ The 'mode' may be one of the following:
*props*::: Restore cgroup properties and require cgroup to pre-exist.
*props*::: Restore cgroup properties and require cgroup to pre-exist.
*soft*::: Restore cgroup properties if only cgroup has been created
*soft*::: Restore cgroup properties if only cgroup has been created
by *cr
iu
*, otherwise do not restore properties. This is the
by *cr
bk
*, otherwise do not restore properties. This is the
default if mode is unspecified.
default if mode is unspecified.
*full*::: Always restore all cgroups and their properties.
*full*::: Always restore all cgroups and their properties.
...
@@ -467,7 +467,7 @@ The 'mode' may be one of the following:
...
@@ -467,7 +467,7 @@ The 'mode' may be one of the following:
*-j*, *--shell-job*::
*-j*, *--shell-job*::
Restore shell jobs, in other words inherit session and process group
Restore shell jobs, in other words inherit session and process group
ID from the cr
iu
itself.
ID from the cr
bk
itself.
*--cpu-cap* ['cap'[,'cap'...]]::
*--cpu-cap* ['cap'[,'cap'...]]::
Specify CPU capabilities to be present on the CPU the process is
Specify CPU capabilities to be present on the CPU the process is
...
@@ -498,7 +498,7 @@ The 'mode' may be one of the following:
...
@@ -498,7 +498,7 @@ The 'mode' may be one of the following:
+
+
For example, this option can be used in case *--cpu-cap=cpu* was used
For example, this option can be used in case *--cpu-cap=cpu* was used
during *dump*, and images are migrated to a less capable CPU and are
during *dump*, and images are migrated to a less capable CPU and are
to be restored. By default, *cr
iu
* shows an error that CPU capabilities
to be restored. By default, *cr
bk
* shows an error that CPU capabilities
are not adequate, but this can be suppressed by using *--cpu-cap=none*.
are not adequate, but this can be suppressed by using *--cpu-cap=none*.
*--weak-sysctls*::
*--weak-sysctls*::
...
@@ -516,10 +516,10 @@ are not adequate, but this can be suppressed by using *--cpu-cap=none*.
...
@@ -516,10 +516,10 @@ are not adequate, but this can be suppressed by using *--cpu-cap=none*.
*check*
*check*
~~~~~~~
~~~~~~~
Checks whether the kernel supports the features needed by *cr
iu
* to
Checks whether the kernel supports the features needed by *cr
bk
* to
dump and restore a process tree.
dump and restore a process tree.
There are three categories of kernel support, as described below. *cr
iu
There are three categories of kernel support, as described below. *cr
bk
check* always checks Category 1 features unless *--feature* is specified
check* always checks Category 1 features unless *--feature* is specified
which only checks a specified feature.
which only checks a specified feature.
...
@@ -536,16 +536,16 @@ which only checks a specified feature.
...
@@ -536,16 +536,16 @@ which only checks a specified feature.
are used for experimental purposes (mostly
are used for experimental purposes (mostly
during development).
during development).
If there are no errors or warnings, *cr
iu
* prints "Looks good." and its
If there are no errors or warnings, *cr
bk
* prints "Looks good." and its
exit code is 0.
exit code is 0.
A missing Category 1 feature causes *cr
iu
* to print "Does not look good."
A missing Category 1 feature causes *cr
bk
* to print "Does not look good."
and its exit code is non-zero.
and its exit code is non-zero.
Missing Category 2 and 3 features cause *cr
iu
* to print "Looks good but
Missing Category 2 and 3 features cause *cr
bk
* to print "Looks good but
..." and its exit code is be non-zero.
..." and its exit code is be non-zero.
Without any options, *cr
iu
check* checks Category 1 features. This
Without any options, *cr
bk
check* checks Category 1 features. This
behavior can be changed by using the following options:
behavior can be changed by using the following options:
*--extra*::
*--extra*::
...
@@ -563,7 +563,7 @@ behavior can be changed by using the following options:
...
@@ -563,7 +563,7 @@ behavior can be changed by using the following options:
*page-server*
*page-server*
~~~~~~~~~~~~~
~~~~~~~~~~~~~
Launches *cr
iu
* in page server mode.
Launches *cr
bk
* in page server mode.
*--daemon*::
*--daemon*::
Runs page server as a daemon (background process).
Runs page server as a daemon (background process).
...
@@ -594,7 +594,7 @@ Launches *criu* in page server mode.
...
@@ -594,7 +594,7 @@ Launches *criu* in page server mode.
*lazy-pages*
*lazy-pages*
~~~~~~~~~~~~
~~~~~~~~~~~~
Launches *cr
iu
* in lazy-pages daemon mode.
Launches *cr
bk
* in lazy-pages daemon mode.
The *lazy-pages* daemon is responsible for managing user-level demand
The *lazy-pages* daemon is responsible for managing user-level demand
paging for the restored processes. It gets information required to
paging for the restored processes. It gets information required to
...
@@ -611,14 +611,14 @@ is deprecated; please use *Compel* instead.
...
@@ -611,14 +611,14 @@ is deprecated; please use *Compel* instead.
*service*
*service*
~~~~~~~~~
~~~~~~~~~
Launches *cr
iu* in RPC daemon mode, where *criu
* is listening for
Launches *cr
bk* in RPC daemon mode, where *crbk
* is listening for
RPC commands over socket to perform. This is convenient for a
RPC commands over socket to perform. This is convenient for a
case where daemon itself is running in a privileged (superuser) mode
case where daemon itself is running in a privileged (superuser) mode
but clients are not.
but clients are not.
dedup
dedup
~~~~~
~~~~~
Starts pagemap data deduplication procedure, where *cr
iu
* scans over all
Starts pagemap data deduplication procedure, where *cr
bk
* scans over all
pagemap files and tries to minimize the number of pagemap entries by
pagemap files and tries to minimize the number of pagemap entries by
obtaining the references from a parent pagemap image.
obtaining the references from a parent pagemap image.
...
@@ -628,7 +628,7 @@ Fetches current CPU features and write them into an image file.
...
@@ -628,7 +628,7 @@ Fetches current CPU features and write them into an image file.
cpuinfo check
cpuinfo check
~~~~~~~~~~~~~
~~~~~~~~~~~~~
Fetches current CPU features (i.e. CPU the *cr
iu
* is running on) and test if
Fetches current CPU features (i.e. CPU the *cr
bk
* is running on) and test if
they are compatible with the ones present in an image file.
they are compatible with the ones present in an image file.
...
@@ -638,16 +638,16 @@ CONFIGURATION FILES
...
@@ -638,16 +638,16 @@ CONFIGURATION FILES
option on command line, which is useful especially with repeated usage of
option on command line, which is useful especially with repeated usage of
same options. A specific configuration file can be passed with
same options. A specific configuration file can be passed with
the "*--config* 'file'" option. If no file is passed, the default configuration
the "*--config* 'file'" option. If no file is passed, the default configuration
files '/etc/cr
iu/default.conf' and '$HOME/.criu
/default.conf' are parsed (if
files '/etc/cr
bk/default.conf' and '$HOME/.crbk
/default.conf' are parsed (if
present on the system). If the environment variable CR
IU
_CONFIG_FILE is set,
present on the system). If the environment variable CR
BK
_CONFIG_FILE is set,
it will also be parsed.
it will also be parsed.
The options passed to CR
IU
via CLI, RPC or configuration file are evaluated
The options passed to CR
BK
via CLI, RPC or configuration file are evaluated
in the following order:
in the following order:
- apply_config(/etc/cr
iu
/default.conf)
- apply_config(/etc/cr
bk
/default.conf)
- apply_config($HOME/.cr
iu
/default.conf)
- apply_config($HOME/.cr
bk
/default.conf)
- apply_config(CR
IU
_CONFIG_FILE)
- apply_config(CR
BK
_CONFIG_FILE)
- apply_config(*--config* 'file')
- apply_config(*--config* 'file')
- apply_config(CLI) or apply_config(RPC)
- apply_config(CLI) or apply_config(RPC)
- apply_config(RPC configuration file) (only for RPC mode)
- apply_config(RPC configuration file) (only for RPC mode)
...
@@ -669,20 +669,20 @@ are interpreted literally.
...
@@ -669,20 +669,20 @@ are interpreted literally.
Example of configuration file to illustrate syntax:
Example of configuration file to illustrate syntax:
---------------
---------------
$ cat ~/.cr
iu
/default.conf
$ cat ~/.cr
bk
/default.conf
tcp-established
tcp-established
work-dir "/home/USERNAME/cr
iu
/my \"work\" directory"
work-dir "/home/USERNAME/cr
bk
/my \"work\" directory"
#this is a comment
#this is a comment
no-restore-sibling # this is another comment
no-restore-sibling # this is another comment
---------------
---------------
Configuration files in RPC mode
Configuration files in RPC mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Not only does *cr
iu
* evaluate configuration files in CLI mode, it also
Not only does *cr
bk
* evaluate configuration files in CLI mode, it also
evaluates configuration files in RPC mode. Just as in CLI mode the
evaluates configuration files in RPC mode. Just as in CLI mode the
configuration file values are evaluated first. This means that any option
configuration file values are evaluated first. This means that any option
set via RPC will overwrite the configuration file setting. The user can
set via RPC will overwrite the configuration file setting. The user can
thus change *cr
iu
*'s default behavior but it is not possible to change
thus change *cr
bk
*'s default behavior but it is not possible to change
settings which are explicitly set by the RPC client.
settings which are explicitly set by the RPC client.
The RPC client can, however, specify an additional configuration file
The RPC client can, however, specify an additional configuration file
...
@@ -690,7 +690,7 @@ which will be evaluated after the RPC options (see above for option evaluation
...
@@ -690,7 +690,7 @@ which will be evaluated after the RPC options (see above for option evaluation
order). The RPC client can specify this additional configuration file
order). The RPC client can specify this additional configuration file
via "req.opts.config_file = '/path/to/file'". The values from this
via "req.opts.config_file = '/path/to/file'". The values from this
configuration file will overwrite all other configuration file settings
configuration file will overwrite all other configuration file settings
or RPC options. *This can lead to undesired behavior of cr
iu
and
or RPC options. *This can lead to undesired behavior of cr
bk
and
should only be used carefully.*
should only be used carefully.*
EXAMPLES
EXAMPLES
...
@@ -699,19 +699,19 @@ To checkpoint a program with pid of *1234* and write all image files into
...
@@ -699,19 +699,19 @@ To checkpoint a program with pid of *1234* and write all image files into
directory *checkpoint*:
directory *checkpoint*:
----------
----------
cr
iu
dump -D checkpoint -t 1234
cr
bk
dump -D checkpoint -t 1234
----------
----------
To restore this program detaching cr
iu
itself:
To restore this program detaching cr
bk
itself:
----------
----------
cr
iu
restore -d -D checkpoint
cr
bk
restore -d -D checkpoint
----------
----------
AUTHOR
AUTHOR
------
------
The CR
IU
team.
The CR
BK
team.
COPYRIGHT
COPYRIGHT
...
...
Makefile
View file @
f466f811
...
@@ -122,7 +122,7 @@ ifeq ($(GMON),1)
...
@@ -122,7 +122,7 @@ ifeq ($(GMON),1)
export
GMON
GMONLDOPT
export
GMON
GMONLDOPT
endif
endif
CFLAGS
+=
$(USERCFLAGS)
$(WARNINGS)
$(DEFINES)
-iquote
include/
CFLAGS
+=
$(USERCFLAGS)
$(WARNINGS)
$(DEFINES)
-iquote
include/
-w
HOSTCFLAGS
+=
$(WARNINGS)
$(DEFINES)
-iquote
include/
HOSTCFLAGS
+=
$(WARNINGS)
$(DEFINES)
-iquote
include/
export
CFLAGS
USERCLFAGS
HOSTCFLAGS
export
CFLAGS
USERCLFAGS
HOSTCFLAGS
...
...
Makefile.install
View file @
f466f811
...
@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
...
@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
export
LIBDIR
INCLUDEDIR
LIBEXECDIR
export
LIBDIR
INCLUDEDIR
LIBEXECDIR
install-man
:
install-man
:
$(Q)
$(MAKE)
-C
Documentation
install
#
$(Q)
$(MAKE)
-C
Documentation
install
.PHONY
:
install-man
.PHONY
:
install-man
install-lib
:
lib
install-lib
:
lib
...
...
criu/arch/x86/crtools.c
View file @
f466f811
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "types.h"
#include "types.h"
#include "asm/compat.h"
#include "asm/compat.h"
#include <stdlib.h>
#undef LOG_PREFIX
#undef LOG_PREFIX
#define LOG_PREFIX "x86: "
#define LOG_PREFIX "x86: "
...
@@ -16,6 +17,9 @@
...
@@ -16,6 +17,9 @@
#define XSAVE_PB_NELEMS(__s, __obj, __member) \
#define XSAVE_PB_NELEMS(__s, __obj, __member) \
(sizeof(__s) / sizeof(*(__obj)->__member))
(sizeof(__s) / sizeof(*(__obj)->__member))
char
*
rpc_cfg_file
=
NULL
;
int
save_task_regs
(
void
*
x
,
user_regs_struct_t
*
regs
,
user_fpregs_struct_t
*
fpregs
)
int
save_task_regs
(
void
*
x
,
user_regs_struct_t
*
regs
,
user_fpregs_struct_t
*
fpregs
)
{
{
CoreEntry
*
core
=
x
;
CoreEntry
*
core
=
x
;
...
...
criu/crtools.c
View file @
f466f811
...
@@ -204,7 +204,7 @@ int main(int argc, char *argv[], char *envp[])
...
@@ -204,7 +204,7 @@ int main(int argc, char *argv[], char *envp[])
if
(
!
strcmp
(
argv
[
optind
],
"restore"
))
{
if
(
!
strcmp
(
argv
[
optind
],
"restore"
))
{
if
(
opts
.
tree_id
)
if
(
opts
.
tree_id
)
pr_warn
(
"Using -t with cr
iu
restore is obsoleted
\n
"
);
pr_warn
(
"Using -t with cr
bk
restore is obsoleted
\n
"
);
ret
=
cr_restore_tasks
();
ret
=
cr_restore_tasks
();
if
(
ret
==
0
&&
opts
.
exec_cmd
)
{
if
(
ret
==
0
&&
opts
.
exec_cmd
)
{
...
@@ -256,15 +256,19 @@ int main(int argc, char *argv[], char *envp[])
...
@@ -256,15 +256,19 @@ int main(int argc, char *argv[], char *envp[])
pr_msg
(
"Error: unknown command: %s
\n
"
,
argv
[
optind
]);
pr_msg
(
"Error: unknown command: %s
\n
"
,
argv
[
optind
]);
usage:
usage:
if
(
usage_error
)
{
return
1
;
}
return
0
;
pr_msg
(
"
\n
"
pr_msg
(
"
\n
"
"Usage:
\n
"
"Usage:
\n
"
" cr
iu
dump|pre-dump -t PID [<options>]
\n
"
" cr
bk
dump|pre-dump -t PID [<options>]
\n
"
" cr
iu
restore [<options>]
\n
"
" cr
bk
restore [<options>]
\n
"
" cr
iu
check [--feature FEAT]
\n
"
" cr
bk
check [--feature FEAT]
\n
"
" cr
iu
page-server
\n
"
" cr
bk
page-server
\n
"
" cr
iu
service [<options>]
\n
"
" cr
bk
service [<options>]
\n
"
" cr
iu
dedup
\n
"
" cr
bk
dedup
\n
"
" cr
iu
lazy-pages -D DIR [<options>]
\n
"
" cr
bk
lazy-pages -D DIR [<options>]
\n
"
"
\n
"
"
\n
"
"Commands:
\n
"
"Commands:
\n
"
" dump checkpoint a process/tree identified by pid
\n
"
" dump checkpoint a process/tree identified by pid
\n
"
...
@@ -309,8 +313,8 @@ usage:
...
@@ -309,8 +313,8 @@ usage:
" --freeze-cgroup use cgroup freezer to collect processes
\n
"
" --freeze-cgroup use cgroup freezer to collect processes
\n
"
" --weak-sysctls skip restoring sysctls that are not available
\n
"
" --weak-sysctls skip restoring sysctls that are not available
\n
"
" --lazy-pages restore pages on demand
\n
"
" --lazy-pages restore pages on demand
\n
"
" this requires running a second instance of cr
iu
\n
"
" this requires running a second instance of cr
bk
\n
"
" in lazy-pages mode: 'cr
iu
lazy-pages -D DIR'
\n
"
" in lazy-pages mode: 'cr
bk
lazy-pages -D DIR'
\n
"
" --lazy-pages and lazy-pages mode require userfaultfd
\n
"
" --lazy-pages and lazy-pages mode require userfaultfd
\n
"
"
\n
"
"
\n
"
"* External resources support:
\n
"
"* External resources support:
\n
"
...
@@ -340,7 +344,7 @@ usage:
...
@@ -340,7 +344,7 @@ usage:
" --action-script FILE add an external action script
\n
"
" --action-script FILE add an external action script
\n
"
" -j|--"
OPT_SHELL_JOB
" allow one to dump and restore shell jobs
\n
"
" -j|--"
OPT_SHELL_JOB
" allow one to dump and restore shell jobs
\n
"
" -l|--"
OPT_FILE_LOCKS
" handle file locks, for safety, only used for container
\n
"
" -l|--"
OPT_FILE_LOCKS
" handle file locks, for safety, only used for container
\n
"
" -L|--libdir path to a plugin directory
(by default "
CR_PLUGIN_DEFAULT
")
\n
"
" -L|--libdir path to a plugin directory
\n
"
" --force-irmap force resolving names for inotify/fsnotify watches
\n
"
" --force-irmap force resolving names for inotify/fsnotify watches
\n
"
" --irmap-scan-path FILE
\n
"
" --irmap-scan-path FILE
\n
"
" add a path the irmap hints to scan
\n
"
" add a path the irmap hints to scan
\n
"
...
@@ -368,7 +372,7 @@ usage:
...
@@ -368,7 +372,7 @@ usage:
" The type can be either 'apparmor' or 'selinux'.
\n
"
" The type can be either 'apparmor' or 'selinux'.
\n
"
" --skip-mnt PATH ignore this mountpoint when dumping the mount namespace
\n
"
" --skip-mnt PATH ignore this mountpoint when dumping the mount namespace
\n
"
" --enable-fs FSNAMES a comma separated list of filesystem names or
\"
all
\"\n
"
" --enable-fs FSNAMES a comma separated list of filesystem names or
\"
all
\"\n
"
" force cr
iu
to (try to) dump/restore these filesystem's
\n
"
" force cr
bk
to (try to) dump/restore these filesystem's
\n
"
" mountpoints even if fs is not supported
\n
"
" mountpoints even if fs is not supported
\n
"
" --inherit-fd fd[NUM]:RES
\n
"
" --inherit-fd fd[NUM]:RES
\n
"
" Inherit file descriptors, treating fd NUM as being
\n
"
" Inherit file descriptors, treating fd NUM as being
\n
"
...
@@ -387,7 +391,7 @@ usage:
...
@@ -387,7 +391,7 @@ usage:
" user:PID,UID,GID
\n
"
" user:PID,UID,GID
\n
"
"
\n
"
"
\n
"
"Check options:
\n
"
"Check options:
\n
"
" Without options,
\"
cr
iu
check
\"
checks availability of absolutely required
\n
"
" Without options,
\"
cr
bk
check
\"
checks availability of absolutely required
\n
"
" kernel features, critical for performing dump and restore.
\n
"
" kernel features, critical for performing dump and restore.
\n
"
" --extra add check for extra kernel features
\n
"
" --extra add check for extra kernel features
\n
"
" --experimental add check for experimental kernel features
\n
"
" --experimental add check for experimental kernel features
\n
"
...
...
criu/include/cr_options.h
View file @
f466f811
...
@@ -141,7 +141,7 @@ struct cr_options {
...
@@ -141,7 +141,7 @@ struct cr_options {
};
};
extern
struct
cr_options
opts
;
extern
struct
cr_options
opts
;
char
*
rpc_cfg_file
;
extern
char
*
rpc_cfg_file
;
extern
int
parse_options
(
int
argc
,
char
**
argv
,
bool
*
usage_error
,
bool
*
has_exec_cmd
,
int
state
);
extern
int
parse_options
(
int
argc
,
char
**
argv
,
bool
*
usage_error
,
bool
*
has_exec_cmd
,
int
state
);
extern
int
check_options
();
extern
int
check_options
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment