Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crit
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2015-09-16 16:16:24 +0300
committerPavel Emelyanov <xemul@parallels.com>2015-09-21 11:51:39 +0300
commitd2f8f481c73d513cc31574d0662a734ab4999830 (patch)
tree56b481a90a0f411d0e2c7648da4e77c766cf9770 /crit
parente3f900f95429bc0447d8e3cff3cbb2e0a19f8d23 (diff)
crit: Introduce 'info' action
This should print some information about image file itself, e.g. statistical information. Right now print magic and the number of object written in the file. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Diffstat (limited to 'crit')
-rwxr-xr-xcrit11
1 files changed, 11 insertions, 0 deletions
diff --git a/crit b/crit
index ba586fab8..e0118ffec 100755
--- a/crit
+++ b/crit
@@ -41,6 +41,11 @@ def encode(opts):
img = json.load(inf(opts))
pycriu.images.dump(img, outf(opts))
+def info(opts):
+ infs = pycriu.images.info(inf(opts))
+ json.dump(infs, sys.stdout, indent = 4)
+ print
+
def main():
desc = 'CRiu Image Tool'
parser = argparse.ArgumentParser(description=desc,
@@ -73,6 +78,12 @@ def main():
help = 'where to put criu image in binary format (stdout by default)')
encode_parser.set_defaults(func=encode)
+ # Info
+ info_parser = subparsers.add_parser('info',
+ help = 'show info about image')
+ info_parser.add_argument("in")
+ info_parser.set_defaults(func=info)
+
# Show
show_parser = subparsers.add_parser('show',
help = "convert criu image from binary to human-readable json")