Changes

2,063 bytes added ,  12:00, 1 December 2014
Refresh info.
Line 15: Line 15:     
==== criu_req_type ====
 
==== criu_req_type ====
There are only 2 request/response types for now.
+
There are 8 request/response types for now. Comments show cmdline analogs.
 
<pre>enum criu_req_type {
 
<pre>enum criu_req_type {
 
EMPTY = 0;
 
EMPTY = 0;
DUMP = 1;
+
DUMP = 1; /* criu dump */
RESTORE = 2;
+
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>
 
</pre>
Line 26: Line 34:  
It is used to store options.
 
It is used to store options.
 
<pre>message criu_opts {
 
<pre>message criu_opts {
required int32 images_dir_fd = 1;
+
required int32 images_dir_fd = 1;
optional int32 pid = 2;
+
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 = 3;
+
optional bool notify_scripts = 12;
optional bool ext_unix_sk = 4;
+
 
optional bool tcp_established = 5;
+
optional string root = 13;
optional bool evasive_devices = 6;
+
optional string parent_img = 14;
optional bool shell_job = 7;
+
optional bool track_mem = 15;
optional bool file_locks = 8;
+
optional bool auto_dedup = 16;
optional int32 log_level = 9 [default = 2];
+
 
optional string log_file = 10;
+
optional int32 work_dir_fd = 17;
 +
optional bool link_remap = 18;
 +
repeated criu_veth_pair veths = 19;
 +
 
 +
optional uint32 cpu_cap = 20 [default = 0xffffffff];
 +
optional bool force_irmap = 21;
 +
repeated string 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 = 26; /* swrk only */
 
}</pre>
 
}</pre>
   Line 57: Line 88:  
</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 ===
 
=== Response ===
 
==== criu_resp ====
 
==== criu_resp ====
 
<pre>message criu_resp {
 
<pre>message criu_resp {
required criu_req_type type = 1;
+
required criu_req_type type = 1;
required bool success = 2;
+
required bool success = 2;
   −
optional criu_dump_resp dump = 3;
+
optional criu_dump_resp dump = 3;
optional criu_restore_resp restore = 4;
+
optional criu_restore_resp restore = 4;
 +
optional criu_notify notify = 5;
 +
optional criu_page_server_info ps = 6;
 
}
 
}
 
</pre>
 
</pre>
Line 86: Line 153:  
Field "pid" is set to the PID of the restored process.
 
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 ==
 
== Run ==
 
=== Server ===
 
=== Server ===
85

edits