AlkantarClanX12

Your IP : 3.15.148.203


Current Path : /proc/thread-self/root/usr/lib/python2.7/site-packages/pycriu/
Upload File :
Current File : //proc/thread-self/root/usr/lib/python2.7/site-packages/pycriu/cli.pyc

�
k�x]c@s�ddlmZddlZddlZddlZddlZddlZd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
d+d��YZdd
�Zd�Zdad�Zd�Zd�Zd�Zd�Ziied6dd6dd6d6ied6dd6dd6d6ied6dd6dd6d6Zd�ZiZd�Zd�Zd d,d!��YZd"�Zd#�Zied$6ed%6ed&6ed'6Z d(�Z!d)�Z"e#d*kr�e"�ndS(-i����(tprint_functionNcCs&|drt|dd�StjSdS(Ntintrb(topentsyststdin(topts((s./usr/lib/python2.7/site-packages/pycriu/cli.pytinf
s
cCs&|drt|dd�StjSdS(Ntoutsw+(RRtstdout(R((s./usr/lib/python2.7/site-packages/pycriu/cli.pytoutfs
cCsttjj|d|��S(Ntdir(Rtostpathtjoin(Rtname((s./usr/lib/python2.7/site-packages/pycriu/cli.pytdinfscCs�d}y*tjjt|�|d|d�}Wn@tjjk
rr}td|jdtj	�tj
d�nX|dr�d}nt|�}tj
||d|�|tjkr�|jd�ndS(	NtprettytnoplsSUnknown magic %#x.
Maybe you are feeding me an image with raw data(i.e. pages.img)?tfileiitindents
(tNonetpycriutimagestloadRtMagicExceptiontprinttmagicRtstderrtexitR
tjsontdumpR	twrite(RRtimgtexctf((s./usr/lib/python2.7/site-packages/pycriu/cli.pytdecodes*
	cCs2tjt|��}tjj|t|��dS(N(RRRRRRR
(RR!((s./usr/lib/python2.7/site-packages/pycriu/cli.pytencode0scCs<tjjt|��}tj|tjdd�t�dS(NRi(	RRtinfoRRRRR	R(Rtinfs((s./usr/lib/python2.7/site-packages/pycriu/cli.pyR&5scCs$||kr||S|d|dS(Ntns_i((tptval((s./usr/lib/python2.7/site-packages/pycriu/cli.pytget_task_id;stps_itemcBseZd�ZRS(cCs>t|d�|_|d|_||_||_g|_dS(Ntpidtppid(R+R-R.R)tcoretkids(tselfR)R/((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt__init__Es

		(t__name__t
__module__R2(((s./usr/lib/python2.7/site-packages/pycriu/cli.pyR,DsicCswtd|jt|jd�t|jd�dd||jddf�x%|jD]}t|||d�qUWdS(	Ns%7d%7d%7d   %s%stpgidtsidt ittctcommi(RR-R+R)R/R0tshow_ps(R)Rtdepthtkid((s./usr/lib/python2.7/site-packages/pycriu/cli.pyR:Ms
'c	Cs�i}tjjt|d��}x^|dD]R}tjjt|dt|d���}t||dd�}|||j<q,Wd}xP|D]H}||}|jdkr�|}q�n||j}|j	j
|�q�Wtdd�t||�dS(Ns
pstree.imgtentriesscore-%d.imgR-is%7s%7s%7s   %stPIDtPGIDtSIDtCOMM(R>R?R@RA(
RRRRR+R,R-RR.R0tappendRR:(	Rtpsstps_imgR)R/tpstpsrR-tpp((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt
explore_psUs"	


cCs�tdkrBy#tjjt|d��daWqBgaqBXntt�dkrXdSx"tD]}|d|kr_|Sq_WdS(Ns	files.imgR=itid(t	files_imgRRRRRtlen(RtfttfidR#((s./usr/lib/python2.7/site-packages/pycriu/cli.pytftype_find_in_filesps#

cCs�t|||�}|r$||dS|ddkrZtjjt||��d|d<nx&|dD]}|d|kre|SqeWdS(NtfieldR!R=RI(RNRRRRR(RRLRMR!R#((s./usr/lib/python2.7/site-packages/pycriu/cli.pytftype_find_in_image�s&cCs)t|||d�}|r%|dp(dS(Ns
reg-files.imgRsunknown path(RP(RRLRMtrf((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt	ftype_reg�scCs-t|||d�}|r)d|dp,dS(Ns	pipes.imgspipe[%d]tpipe_idspipe[?](RP(RRLRMR)((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt
ftype_pipe�scCsVt|||d�}|sdS|dr7d|dp:d}d|d|d|fS(	Ns
unixsk.imgsunix[?]Rs %stsunix[%d (%d)%s]tinotpeer(RP(RRLRMtuxtn((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt
ftype_unix�s
tgetR!tregROtREGtpipetPIPEtusktUNIXSKcCsd|d|fS(Ns%s.%dttyp((RRLRM((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt	ftype_gen�scCs|d|df}tj|d�}|s{tj|ditd6|dd6�}|d|||d�}|t|<n|S(NttypeRIR[Rb(tfiles_cacheR[Rt
file_typesRc(RtfdtkeyR#RL((s./usr/lib/python2.7/site-packages/pycriu/cli.pytget_file_str�s(
c	Cs\tjjt|d��}x:|dD].}t|d�}tjjt|d|��}|ddd}tjjt|d|��}td|�x3|dD]'}td	|d
t||�f�q�Wtjjt|d|��dd}tdd
t|idd6|dd6�f�tddt|idd6|dd6�f�q&WdS(Ns
pstree.imgR=R-s
ids-%s.imgitfiles_ids
fdinfo-%d.imgs%ds	%7d: %sRgs	fs-%d.imgs	%7s: %stcwdR]Rdtcwd_idRItroottroot_id(RRRRR+RRi(RRDR)R-tiditfdttfdiRg((s./usr/lib/python2.7/site-packages/pycriu/cli.pytexplore_fds�s$%'tvma_idcBseZd�Zd�ZRS(cCsi|_d|_dS(Ni(t_vma_id__idst
_vma_id__last(R1((s./usr/lib/python2.7/site-packages/pycriu/cli.pyR2�s	cCsG|jj|d�}|sC|j}|jd7_||j|<n|S(Ni(RtR[RRu(R1tiidtret((s./usr/lib/python2.7/site-packages/pycriu/cli.pyR[�s	(R3R4R2R[(((s./usr/lib/python2.7/site-packages/pycriu/cli.pyRs�s	c	Cs�tjjt|d��}t�}xz|dD]n}t|d�}tjjt|d|��dd}td|�tddt|id	d
6|dd6�f�x�|d
D]�}|d}|d1@r�dd|j|d�}n|d2@rdd|j|d�}n�|d3@r;dd|j|d�}n�|d4d5B@r�dt|id	d
6|dd6�}|dr�|d|d7}n|d6@r�|d7}q�nV|d7@r�d}nC|d8@r�d}n0|d9@r�d!}n|d"d#@r�d$}nd%}|d:@s|d&7}n|d'd@r(d(p+d)}	|	|d'd@rEd*pHd)7}	|	|d'd+@rcd,pfd)7}	d-|d.|d/f}
td0|
|	|f�q�Wq/WdS(;Ns
pstree.imgR=R-s	mm-%d.imgis%ds	%-36s    %stexeR]Rdtexe_file_idRItvmaststatusii
R7sips[%lx]tshmidis
shmem[%lx]ispacket[%lx]iitpgoffs + %#lxs (s)s [stack]is [vsyscall]is [vdso]tflagsis	 [stack?]RUs *tprottrt-twitxs%08lx-%08lxtstarttends
	%-36s%s%siiii@i�i�iiii(	RRRRRsR+RRiR[(RRDtvidsR)R-tmmitvmatsttfnRtastr((s./usr/lib/python2.7/site-packages/pycriu/cli.pytexplore_mems�sT	'		






	
	
		

c
	Cs�tjjt|d��}x�|dD]�}t|d�}tjjt|d|��ddd}tjjt|d|��d}td|�d}d	}xO|d
D]C}d|d|d
f}	x&||d|dkr�|d
7}q�W|d|d
d>}
d}x�||d|
kr�||}||krK|d7}nl|d|d|d|dd?f7}|dddB@r�|dt|idd6|dd6�7}n|}|dd7}|d
7}qW|d
8}td|	|f�q�Wq&WdS( Ns
pstree.imgR=R-s	mm-%d.imgiRzspagemap-%d.imgs%di����is	%lx / %-8dtvaddrtnr_pagesR�iRUR�s ~s
 %08lx / %-8dR{iiR7R]RdR|RIs
	%23ss%-24s%si@i�(RRRRR+RRi(
RRDR)R-RztpmstvmitpvmitpmtpstrtpmetvstrR�((s./usr/lib/python2.7/site-packages/pycriu/cli.pytexplore_rss%s<#

"
REtfdstmemstrsscCst|d|�dS(Ntwhat(t	explorers(R((s./usr/lib/python2.7/site-packages/pycriu/cli.pytexploreTsc	Cs.d}tjd|dtj�}|jdd�}|jddd�}|jddd	d
d�|jdd
dd�|jdddd�|jdtdt�|jddd�}|jdd
dd�|jdddd�|jdt	�|jddd�}|jd�|jdt
�|jddd�}|jd�|jddd d!d"d#g�|jdt�|jd$dd%�}|jd�|jd&dd'd
d�|jdtd(td)d�t|j��}|stjj|j��tjjd*�tjd+�n|d|�dS(,NsCRiu Image Tooltdescriptiontformatter_classthelps-Use crit CMD --help for command-specific helpR$s+convert criu image from binary type to jsons--prettysIMultiline with indents and some numerical fields in field-specific formattactiont
store_trues-is--ins<criu image in binary format to be decoded (stdin by default)s-os--outs:where to put criu image in json format (stdout by default)tfuncRR%s+convert criu image from json type to binarys:criu image in json format to be encoded (stdin by default)s<where to put criu image in binary format (stdout by default)R&sshow info about imageRR�sexplore image dirRR�tchoicesRER�R�R�tshows5convert criu image from binary to human-readable jsons--nopls%do not show entry payload (if exists)RRscrit: error: too few arguments
i(targparsetArgumentParsertRawTextHelpFormattertadd_subparserst
add_parsertadd_argumenttset_defaultsR$tFalseR%R&R�tTrueRtvarst
parse_argsRRR tformat_usageR(	tdesctparsert
subparserst
decode_parsert
encode_parsertinfo_parsertx_parsertshow_parserR((s./usr/lib/python2.7/site-packages/pycriu/cli.pytmainXsf			


t__main__((($t
__future__RR�RRRRRR
RR$R%R&R+R,R:RHRRJRNRPRRRTRZRfRcReRiRrRsR�R�R�R�R�R3(((s./usr/lib/python2.7/site-packages/pycriu/cli.pyt<module>sd												
								5	'
		E