[CRIU] Difference between two snapshots generated by CRIU

Ruslan Kuprieiev kupruser at gmail.com
Tue Feb 10 05:22:03 PST 2015


Hi,

On 02/10/2015 01:30 PM, Thouraya TH wrote:
> Hello all,  i have done two times the dumping process of this process 
> http://criu.org/Simple_loop
>
> root at g-52:/home# *cd LoopProcess*
> root at g-52:/home/LoopProcess# ls
> cgroup.img      dump.log       fdinfo-2.img   fs-9162.img 
> inotify.img    ns-files.img      pages-2.img remap-fpath.img   
> stats-dump    unixsk.img
> core-9162.img   eventfd.img    fdinfo-3.img   fs-9773.img 
> inventory.img  packetsk.img      pipes-data.img sigacts-9162.img  
> timerfd.img
> core-9773.img   eventpoll.img  fifo-data.img  ids-9162.img 
> mm-9162.img    pagemap-9162.img  pipes.img sigacts-9773.img  tty.img
> creds-9162.img  ext-files.img  fifo.img       ids-9773.img 
> mm-9773.img    pagemap-9773.img  pstree.img signalfd.img      tty-info.img
> creds-9773.img  fanotify.img   filelocks.img  inetsk.img 
> netlinksk.img  pages-1.img       reg-files.img sk-queues.img     
> tunfile.img
>
> root at g-52:/home/LoopProcess# cd ..
> root at g-52:/home# *cd LoopProcess1/*
> root at g-52:/home/LoopProcess1# ls
> cgroup.img       dump.log       fdinfo-2.img fs-10821.img   
> inotify.img    ns-files.img pages-2.img     remap-fpath.img    
> stats-dump    unixsk.img
> core-10821.img   eventfd.img    fdinfo-3.img fs-9162.img    
> inventory.img  packetsk.img pipes-data.img  sigacts-10821.img  timerfd.img
> core-9162.img    eventpoll.img  fifo-data.img ids-10821.img  
> mm-10821.img   pagemap-10821.img pipes.img       sigacts-9162.img   
> tty.img
> creds-10821.img  ext-files.img  fifo.img ids-9162.img   mm-9162.img    
> pagemap-9162.img pstree.img      signalfd.img       tty-info.img
> creds-9162.img   fanotify.img   filelocks.img inetsk.img     
> netlinksk.img  pages-1.img reg-files.img   sk-queues.img      tunfile.img
>
> Then:
>
> criu show -D LoopProcess
> i see many lines.. i'd like to redirect the result of this command to 
> a file like that:
>
> criu show -D LoopProcess > first.txt
>
> but i have these error :
> Error (image.c:231): Unable to open netdev-2.img: No such file or 
> directory
> Error (image.c:231): Unable to open ifaddr-2.img: No such file or 
> directory
> Error (image.c:231): Unable to open route-2.img: No such file or directory
> Error (image.c:231): Unable to open iptables-2.img: No such file or 
> directory
> Error (image.c:231): Unable to open ipcns-var-3.img: No such file or 
> directory
> Error (image.c:231): Unable to open ipcns-shm-3.img: No such file or 
> directory
> Error (image.c:231): Unable to open ipcns-msg-3.img: No such file or 
> directory
> Error (image.c:231): Unable to open ipcns-sem-3.img: No such file or 
> directory
> Error (image.c:231): Unable to open utsns-4.img: No such file or directory
> Error (image.c:231): Unable to open mountpoints-5.img: No such file or 
> directory
>
>
> ?
>

These are the obsoleted and optional images. We should probably print 
warnings there,
but we now have(in git and will probably have it starting from the next 
criu version) CRIT[1] which
is a feature-rich replacement of "criu show".
Btw, if you could try using CRIT(crit decode -i path/to/criu/image 
--pretty) to generate json interpretation
of images and then nicely compare them using lots of json tools.

For example:
$ ../../crit decode -i imgs1/pstree.img --pretty
{
     "magic": "PSTREE",
     "entries": [
         {
             "pgid": 5580,
             "threads": [
                 5580
             ],
             "ppid": 0,
             "pid": 5580,
             "sid": 5580
         },
         {
             "pgid": 5580,
             "threads": [
                 5591
             ],
             "ppid": 5580,
             "pid": 5591,
             "sid": 5580
         }
     ]
}

$ ../../crit decode -i imgs2/pstree.img --pretty
{
     "magic": "PSTREE",
     "entries": [
         {
             "pgid": 5661,
             "threads": [
                 5661
             ],
             "ppid": 0,
             "pid": 5661,
             "sid": 5661
         }
     ]
}

For example, paste both to http://prettydiff.com/ and get nice diff.

[1] http://criu.org/CRIT

> Thanks a lot.
> Best Regards.
Thanks,
Ruslan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150210/7c2119af/attachment.html>


More information about the CRIU mailing list