[CRIU] [PATCH 0/4] criu2text, v2

Ruslan Kuprieiev kupruser at gmail.com
Fri Sep 19 06:53:09 PDT 2014


criu2text is a program written in python to convert criu images
to/from human readable format. From name.img file it produces set of
text files: name.img.magic, name.img.0, name.img.1 ... File named
name.img.magic has only criu image magic in hex (0x1234) format.
Files name.img.0, name.img.1 ... are protobuf messages in protobuf
text format. Number of files N depends on number of pb entrys stored
in image file.

Usage:
criu2text [-h] [-o OUT] {to-text,to-img} image

positional arguments:
	{to-text,to-img}   to what type convert input file(s)
	image              path to criu image or base path to criu image
			   files in human-readable format (e.g. ./imgs/core-1234.img)

	optional arguments:
	  -h, --help         show this help message and exit
	  -o OUT, --out OUT  directory where output file(s) should be placed

Examples:
 1) Convert ./core-1234.img to set of text files (core-1234.img.magic,
    core-1234.img.0) and place them at text_imgs_dir.

	$ criu2text to-text core-1234.img -o text_imgs_dir
	$ ls text_imgs_dir
	core-1234.img.magic
	core-1234.img.0

 2) Convert text_imgs_dir/core-1234.img.magic, text_imgs_dir/core-1234.img.0
    (note common base text_imgs_dir/core-1234.img, which we're specifying)
    to criu img format and place it at imgs_dir.

	$ criu2text to-img text_imgs_dir/core-1234.img -o imgs_dir
	$ ls imgs_dir
	core-1234.img

v2, enhanced cmdline options handler

Ruslan Kuprieiev (4):
  protobuf: move enum nd_type inside net_device_entry message
  tools: add criu2text
  criu2text: add test
  criu2text: add README

 net.c                           |  22 +++---
 protobuf/netdev.proto           |  26 +++----
 tools/criu2text/.gitignore      |   4 ++
 tools/criu2text/Makefile        |  20 ++++++
 tools/criu2text/README          |  51 +++++++++++++
 tools/criu2text/criu2text       | 156 ++++++++++++++++++++++++++++++++++++++++
 tools/criu2text/images.py       | 112 +++++++++++++++++++++++++++++
 tools/criu2text/magic-gen.py    |  44 ++++++++++++
 tools/criu2text/test/.gitignore |   3 +
 tools/criu2text/test/Makefile   |  14 ++++
 tools/criu2text/test/loop.sh    |   4 ++
 tools/criu2text/test/test.sh    |  25 +++++++
 12 files changed, 457 insertions(+), 24 deletions(-)
 create mode 100644 tools/criu2text/.gitignore
 create mode 100644 tools/criu2text/Makefile
 create mode 100644 tools/criu2text/README
 create mode 100755 tools/criu2text/criu2text
 create mode 100644 tools/criu2text/images.py
 create mode 100644 tools/criu2text/magic-gen.py
 create mode 100644 tools/criu2text/test/.gitignore
 create mode 100644 tools/criu2text/test/Makefile
 create mode 100755 tools/criu2text/test/loop.sh
 create mode 100644 tools/criu2text/test/test.sh

-- 
1.9.3



More information about the CRIU mailing list