Changes

Jump to: navigation, search

RPC

2,063 bytes added, 12:00, 1 December 2014
Refresh info.
==== criu_req_type ====
There are only 2 8 request/response types for now. Comments show cmdline analogs.
<pre>enum criu_req_type {
EMPTY = 0;
DUMP = 1;/* criu dump */ RESTORE = 2;/* criu restore */ CHECK = 3; /* criu check */ PRE_DUMP = 4; /* criu pre-dump */ PAGE_SERVER = 5; /* criu page-server */  NOTIFY = 6;  CPUINFO_DUMP = 7; /* criu cpuinfo dump */ CPUINFO_CHECK = 8; /* criu cpuinfo check */
}
</pre>
It is used to store options.
<pre>message criu_opts {
required int32 images_dir_fd = 1; optional int32 pid = 2; /* if not set on dump, will dump requesting process */  optional bool leave_running = 3; optional bool ext_unix_sk = 4; optional bool tcp_established = 5; optional bool evasive_devices = 6; optional bool shell_job = 7; optional bool file_locks = 8; optional int32 log_level = 9 [default = 2]; optional string log_file = 10; /* No subdirs are allowed. Consider using work-dir */  optional criu_page_server_info ps = 11;
optional bool leave_running notify_scripts = 312;  optional bool ext_unix_sk string root = 413; optional bool tcp_established string parent_img = 514; optional bool evasive_devices track_mem = 615; optional bool shell_job auto_dedup = 16;  optional int32 work_dir_fd = 717; optional bool file_locks link_remap = 18; repeated criu_veth_pair veths = 819;  optional int32 log_level uint32 cpu_cap = 9 20 [default = 20xffffffff]; optional bool force_irmap = 21; repeated string log_file exec_cmd = 22;  repeated ext_mount_map ext_mnt = 23; optional bool manage_cgroups = 24; repeated cgroup_root cg_root = 25;  optional bool rst_sibling = 1026;/* swrk only */
}</pre>
</pre>
===== criu_page_server_info =====
Stores info about page-server.
<pre>
message criu_page_server_info {
optional string address = 1; /* bind address -- if not set 0.0.0.0 is used */
optional int32 port = 2; /* bind port -- if not set on request, autobind is used and port is returned in response */
optional int32 pid = 3; /* page-server pid -- returned in response */
optional int32 fd = 4; /* could be used to inherit fd by page-server */
}
</pre>
===== criu_veth_pair =====
TODO
<pre>
message criu_veth_pair {
required string if_in = 1;
required string if_out = 2;
};
</pre>
===== ext_mount_map =====
TODO
<pre>
message ext_mount_map {
required string key = 1;
required string val = 2;
};
</pre>
===== cgroup_root =====
TODO
<pre>
message cgroup_root {
optional string ctrl = 1;
required string path = 2;
};
</pre>
=== Response ===
==== criu_resp ====
<pre>message criu_resp {
required criu_req_type type = 1; required bool success = 2;
optional criu_dump_resp dump = 3; optional criu_restore_resp restore = 4; optional criu_notify notify = 5; optional criu_page_server_info ps = 6;
}
</pre>
Field "pid" is set to the PID of the restored process.
==== criu_notify ====
TODO
<pre>
message criu_notify {
optional string script = 1;
optional int32 pid = 2;
}
</pre>
== Run ==
=== Server ===
84
edits

Navigation menu