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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/usr/lib/python2.7/site-packages/sos/
Upload File :
Current File : //usr/lib/python2.7/site-packages/sos/sosreport.pyc
�
u��ec@sdZddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
Zddlm
Z
mZddlmZddlZddlZddlmZmZddlZddlmZdd	lmZdd
lmZmZddlZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddl*Z*dd
l+m,Z,m-Z-ej.ej/fZ0e1dd�Z2d�Z3de4fd��YZ5de	fd��YZ6dddgZ7d�Z8de4fd��YZ9d�Z:dS(sm
Gather information about a system and report it using plugins
supplied for application-specific information
i����N(tdatetime(tArgumentParsertAction(tImporterHelpertSoSTimeoutError(trmtree(tThreadPoolExecutortTimeoutError(t_sos(t__version__(t
_arg_defaultst
SoSOptions(tTarFileArchive(
tReporttSectiontCommandt
CopiedFiletCreatedFiletAlerttNotetPlainTextReportt
JSONReportt
HTMLReport(tziptinputs, cCs�g}|}|r%t|�d}nd}xX|D]P}t|�t|�t|�dkrt|j|�|}n|||}q2W|t|�|kr�|t|� }n|j|�|S(Nt tiH(tlentappend(t
first_linetitemstindenttseptlinestlinetnewlinetitem((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_format_list3s
&
	
cCstjdj|�d�S(s� This function will format --since arg to append 0s if enduser
    didn't. It's used in the _get_parser.
    This will also be a good place to add human readable and relative
    date parsing (like '2 days ago') in the future s{:<014s}s%Y%m%d%H%M%S(Rtstrptimetformat(tdate((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt
_format_sinceEstTempFileUtilcBs#eZd�Zd�Zd�ZRS(cCs||_g|_dS(N(ttmp_dirtfiles(tselfR+((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt__init__Os	cCsGtjd|j�\}}tj|d�}|jj||f�|S(Ntdirsw+(ttempfiletmkstempR+tostfdopenR,R(R-tfdtfnametfobj((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytnewSscCsxxh|jD]]\}}y|j�|j�Wntk
rAnXytj|�Wq
tk
rfq
Xq
Wg|_dS(N(R,tflushtcloset	ExceptionR2tunlink(R-R5tf((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytcleanZs


(t__name__t
__module__R.R7R=(((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR*Ms		t
SosListOptioncBseZdZdd�ZRS(s0Allow to specify comma delimited list of pluginscCsdg|jd�D]}|^q}t||j�rM|t||j�7}nt||j|�dS(Nt,(tsplittgetattrtdesttsetattr(R-tparsert	namespacetvaluest
option_stringtoptR((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt__call__ls"N(R>R?t__doc__tNoneRK(((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR@hstautotalwaystneverc
Csd}td|�}|jddt�|jdddddd	d
tdd�|jd
ddddd
tdd�|jdddddd
d�dtdd�|jdddddd
tdd�|jdddddd
tdd�|jddddddd�|jdddddd dd!d
td �|jd"dtdddd#d
d$dd%�|jd&dddd'dd(�|jd)d*dtdddd+d
d,�|jd-dddd.�|jd/dddd0d
tdd1�|jd2d3dddd4dtdd5d
g�|jd6d7dddd8dtdd9d
g�|jd:d;dddd<dd=�|jd>d?dddd@d
tddA�|jdBddddC�|jdDddddEd
tddF�|jdGddddHdt	d
tdHddI�|jdJdKddddLdtddMd
g�|jdNddddOddPd
t�|jdQddd
tddRddS�|jdTd
tddUddddV�|jdWdtddd
d,ddX�|jdYdZdddd[dtdd\d
g�|jd]dddtdd^d
d_�|jd`d
d�dda�|jdbdcddddddtd
gdde�|jdfdgddddhd
tddi�|jdjdkddddlddmd
d��|jdnddddddo�|jdpddddqddrd
d��|jdsdtdduddvd
tdvddw�f|jdxddddyd
tddz�|jd{d|dd}d
td}dd~�|jdd�dddd�dd�d
d�dt	�|jd�dddd�d
tdd��|jd�ddd
tdd��|jd�d
d�dd��|jd�d
d�dd��|jd�d
d�dd��|jd�d
d�dd��|jd�d
d_d�d_d�d�gdd��|jd�d
d_d�d_d�d�d�gdd��|j
�}|jd�dtdddd��|jd�dtdddd��|j
�}|jd�dd��|jd�dd��|S(�s Build ArgumentParser contents�%(prog)s [options]

Some examples:

enable dlm plugin only and collect dlm lockdumps:
  # sosreport -o dlm -k dlm.lockdump

disable memory and samba plugins, turn off rpm -Va collection:
  # sosreport -n memory,samba -k rpm.rpmva=offtusagetactiontextends-as--alloptionst
store_trueRDt
alloptionstdefaultthelps%enable all options for loaded pluginss
--all-logstall_logss-collect all available logs regardless of sizes--sincetstoretsincettypesbEscapes archived files older than date. This will also affect --all-logs. Format: YYYYMMDD[HHMMSS]s--batchtbatchs(batch mode - do not prompt interactivelys--buildtbuilds;preserve the temporary directory and do not package resultss	--case-idtcase_idsspecify case identifiers-cs--chroottchrootsHchroot executed commands to SYSROOT [auto, always, never] (default=auto)s
--config-filetconfig_files
/etc/sos.confs$specify alternate configuration files--debugtdebugs6enable interactive debugging using the python debuggers--descs
--descriptionsDescription for a new presetRs	--dry-runs#Run plugins but do not collect datas--experimentaltexperimentalsenable experimental pluginss-es--enable-pluginst
enablepluginssenable these pluginss-ks--plugin-optiontplugoptss7plugin options in plugname.option=value format (see -l)s--labels--nametlabels"specify an additional report labels-ls--list-pluginstlist_pluginss)list plugins and available plugin optionss--list-presetss#display a list of available presetss--list-profilest
list_profilessBdisplay a list of available profiles and plugins that they includes
--log-sizetlog_sizes)limit the size of collected logs (in MiB)s-ns--skip-pluginst	nopluginssdisable these pluginss--no-reporttnoreports disable plaintext/HTML reportings
--no-env-varstno_env_varss$Do not collect environment variabless
--no-postproctno_postprocsDisable all post-processings--notesBehaviour notes for new presets-os--only-pluginstonlypluginssenable these plugins onlys--presetsA preset identifierRNs--plugin-timeoutsset a timeout for all pluginss-ps	--profiletprofiless)enable plugins used by the given profiless-qs--quiettquietsonly print fatal errorss-ss	--sysroottsysroots(system root directory path (default='/')s--ticket-numbersspecify ticket numbers	--tmp-dirR+s%specify alternate temporary directorys-vs	--verbosetcountt	verbositysincrease verbositys--verifytverifys+perform data verification during collections-zs--compression-typetcompression_typesDcompression technology to use [auto, gzip, bzip2, xz] (default=auto)s-ts	--threadstthreadss7specify number of concurrent plugins to run (default=4)is--allow-system-changestallow_system_changessJRun commands even if they can change the system (e.g. load kernel modules)s--uploads/Upload the archive to a policy-default locations--upload-urls*Upload the archive to the specified servers--upload-directorys.Specify the directory to upload the archive tos
--upload-users.Username to authenticate to upload server withs
--upload-passs.Password to authenticate to upload server withs--upload-methodtchoicestputtposts HTTP method to use for uploadings--upload-protocolthttpstftptsftps$Manually specify the upload protocols--add-presets#Add a new named command line presets--del-presets$Delete the named command line presets
--encrypt-keys.Encrypt the final archive using a GPG key-pairs--encrypt-passs*Encrypt the final archive using a passwordN(RtregisterR@tadd_argumenttFalseRMR)R
tstrtinttadd_mutually_exclusive_group(tusage_stringRFt
preset_grptencrypt_grp((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_get_parserws









t	SoSReportcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ed	��Zd
d�Z
d�Zd6d6d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!d!d"�Z#d#�Z$d$�Z%d%�Z&d&�Z'd'�Z(d(�Z)d)�Z*d*�Z+d+�Z,d,�Z-d-�Z.d.�Z/d/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6RS(7sThe main sosreport classc	Csg|_g|_g|_t�|_d|_d|_||_d|_	d|_
t|_d|_
y)ddl}|j|j|j��Wntk
r�nX|j�t�}t�j|jg��|_x,|jD]!}|jdkr�d|_q�q�Wt�j|j|��}|jj|�t�j||jj�|_|jj|j�|j�y"tj j!d|jj	�|_"Wnt#k
r�|j$d�nX|j"j%�|_&|jj
t'dkr6|j"j(|jj
�|_
|j
s6t)j*j+d|jj
�|j"j,�|_
t-|j_.q6n|j
sT|j"j,�|_
n|jj|j
j�t/j0j1|j"j2|jj3��}t/j0j4|�s�t/j5|t/j6�r�d|}|d	7}t)j*j+|�|j$d
�n||_
t7j8ddd
|j
�|_9t:|j9�|_|j;�|j<�d}|j"j=�}|jj	rqd}|jj	|_	n0|j"j>�r�|t/j?kr�d}||_	n|j@jAd|j	|f�|jjBtCkr|j@jDd|jjB�tEjF�|jjG�|j$d
�ndS(Nt/i����s==SUPPRESS==RpitpresetsUnknown preset: '%s'
stemporary directory %s s"does not exist or is not writable
itprefixssos.R/RVtcmdlinetpolicysset sysroot to '%s' (%s)sinvalid chroot mode: %s(Htloaded_pluginstskipped_pluginstall_optionstsettenv_varsRMtarchivet
tempfile_utilt_argsRptsys_tmpRtexit_processR�tsignaltSIGTERMtget_exit_handlerR:tprint_headerR�Rt	from_argst
parse_argstoptst_actionsRVtmerget	from_fileR`tfileoptst
_set_debugtsostpoliciestloadR�tKeyboardInterruptt_exittis_roott_is_rootR
tfind_presettsyststderrtwritetprobe_presettTruetlist_presetsR2tpathtabspathtget_tmp_dirR+tisdirtaccesstW_OKR0tmkdtempttmpdirR*t_set_directoriest_setup_loggingthost_sysroottin_containerR tsoslogRaR_tchroot_modesterrortloggingtshutdownR=(	R-targsR�RFtoptiontcmd_optsttmptmsgR�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR.s�										

	

"
		$

	



cCsdtdtf�GHdS(Ns
%s
ssosreport (version %s)(t_R	(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��scCsai	|jd6|jd6|jd6|jd6|jd6|jd6|jd6|jjd6|jd	6S(
NtcmddirtlogdirtrptdirR�R�R�RpRrtcmdlineopts(	R�R�R�R�R�R�RpR�Rr(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytget_commons�s







cCs
|jj�S(N(R�R7(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt
get_temp_file�scCs
i|jjs|jjr!tntd6|jjd6|jjd6}tjj|j|j	j
��}|jjdkr�|j	j�}|||j|j	|jj
||j�|_n-t||j|j	|jj
||j�|_|jj|jjr�tnt�dS(NtencrypttkeytpasswordRN(R�tencrypt_passtencrypt_keyR�RR2R�tjoinR�R�tget_archive_nameRttget_preferred_archiveRuRpR�Rt	set_debugRa(R-tenc_optstarchive_nametauto_archive((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_set_archive�s 
cCsF|jj|jd�|jj|jd�|jj|jd�dS(Ni�(R�tmakedirsR�R�R�(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_make_archive_paths�scCsd|_d|_d|_dS(Ntsos_commandstsos_logstsos_reports(R�R�R�(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��s		cCs1|jjr$|jt_t|_n	t|_dS(N(R�Rat
_exceptionR�t
excepthookR�t
raise_pluginsR(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��sc	Csottd�stjj�r5tj|||�n6tj|||dddtj�tj	�t
j�dS(s* Wrap exception in debugger if not in tty tps1tlimititfileN(thasattrR�R�tisattyt__excepthook__t	tracebacktprint_exceptiontstdouttsixtprint_tpdbtpm(tetypeteval_tetrace((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��s

icCst|��dS(N(t
SystemExit(R-R�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��scs�fd�}|S(Ncst�_�j�dS(N(R�R�R�(tsignumtframe(R-(s1/usr/lib/python2.7/site-packages/sos/sosreport.pytexit_handler�s	((R-R�((R-s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��scCs�|js|jr]tj�\}}}tj|||dtj�tj�t	j
|�n|r||r||j||�ndS(NR�(R�R�R�texc_infoR�R�R�R�R�R�tpost_mortemt_log_plugin_exception(R-tplugnametfuncR�tvalttb((s1/usr/lib/python2.7/site-packages/sos/sosreport.pythandle_exception�s
cCsdtjd�|_|jjtj�|j�|_tj|j�}|jtj	d��|jtj
�|jj|�|jj
s�tjtj�}|jtj	d��|jjr�|jjdkr�|jtj�|jtj�nQ|jjr2|jjdkr2|jtj
�|jtj�n|jtj�|jj|�tjtj�}|jtj	d��|jtj�|jj|�ntjd�|_|jjtj
�|j�|_tj|j�}|jtj	d��|jj|�|jj
s`tjtj�}|jtj	d��|jtj
�|jj|�ndS(NR�s&%(asctime)s %(levelname)s: %(message)ss%(message)siitsos_ui(R�t	getLoggerR�tsetLeveltDEBUGR�tsos_log_filet
StreamHandlertsetFormattert	FormattertINFOt
addHandlerR�RoR�R�RrtWARNINGR�tERRORtui_logtsos_ui_log_file(R-tflogtconsoletconsole_errtui_fhandlert
ui_console((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��sF

cCs~t|dd�r=|jj|jdtjjdd��nt|dd�rz|jj|jdtjjdd��ndS(NRRDR�ssos.logRsui.log(	RCRMR�tadd_fileRR2R�R�R(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt
_add_sos_logsscCs�|jj}t|jj�s"tSt|d�s5tS|rU|j|j��rUtSt	g|jD]}||jjk^qb�S(NRn(
R�RmRRnR�R�Rt_is_not_specifiedtnametany(R-tplugin_classRmtp((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_is_in_profilescCs||jjkS(N(R�Ri(R-tplugin_name((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_is_skipped(scCs;||j��j�o:||jjko:||jjkS(N(R�t
check_enabledR�RcRm(R-RtpluginClass((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_is_inactive+scCs;||j��j�o:||jjko:||jjkS(N(R�tdefault_enabledR�RcRm(R-RR((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_is_not_default0scCs|jjo||jjkS(N(R�Rm(R-R((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR5stunknowncCs/|jj|j�||j��|f�dS(N(R�RRR�(R-Rtreason((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_skip9s		cCs,|jj|j�||j��f�dS(N(R�RRR�(R-R((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_load@s		cCs�tjj}ttj�}|j�}g|_t�|_t|j	j�}|j
j}g}|j	jr�|j
tjj�nt||�}|j
j}t|j	j�}	x�|D]�}
tjj|
�\}}yK|||�}
t|
�s�w�n|j
j|
�}||d|j	j�sn|jjtd�|
�|j	jdkrn|j|td��w�qnn|jr�|jr�|jjtd�|
�|j|td��w�n|jj
|�|j|�}|s�|j|td��w�n|j|�r#|j|td��w�n|j ||�rQ|j|td	��w�n|j!||�r|j|td
��w�nt"|d�r�|jj#|j�n|o�|}|j$|�r�|r�|j|td��w�nx-|jD]"}||	kr�|	j%|�q�q�W|j&|�Wq�t'k
r_}|jjtd
�|
|f�|j(�q�Xq�Wt|	�dkr�|jj)td�dj*|	��|j+�|j,d�ndS(NRbs%plugin %s does not validate, skippingisdoes not validates7plugin %s requires root permissionsto execute, skippings
requires roottexcludedtskippedtinactivetoptionalRns
not specifieds(plugin %s does not install, skipping: %ss+Unknown or inactive profile(s) provided: %ss, i(-R�tpluginst
import_pluginRtget_modulestplugin_namesR�RnRR�R�tvalid_subclassesRbRtExperimentalPluginttupletvalidate_plugintlistR2R�tsplitexttmatch_pluginR�twarningR�RrR#t
requires_rootR�tinfoRRRR R�tupdateRtremoveR$R:R�R�R�RgR�(R-R*thelperR)tusing_profilestpolicy_classest
extra_classestvalid_plugin_classesR0tremaining_profilestplugtplugbasetexttplugin_classesRt
in_profiletdefault_profiletite((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytload_pluginsFs�	
			

cCsv|jjrrxc|jD]U\}}xFt|j|j�D]/\}}t|d�tkr8t|d<q8q8WqWndS(Ntenabled(	R�RUR�Rt	opt_namest	opt_parmsR[tboolR�(R-R�R?Rtparms((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_set_all_options�s
"cCs�|jjr�i}x|jjD]�}y|jd�\}}Wntk
rWt}n@X|j�dkrst}n$yt|�}Wntk
r�nXy|jd�\}}Wntk
r�|}t}nXy||Wntk
r�g||<nX||j	||f�qWx�|j
D]y\}}||krxT||D]H\}}|j||�sB|jj
d||f�|jd�qBqBW||=qqWx(|j�D]}|jj
d	|�q�W|j�r�|jj
d
�q�ndS(Nt=tofftdisabletdisabledtfalset.s#no such option "%s" for plugin (%s)isFWARNING: unable to set option for disabled or non-existing plugin (%s)R(RORPRQRR(R�RdRBt
ValueErrorR�tlowerRR�tKeyErrorRR�t
set_optionR�R�R�tkeys(R-R�RJR�R?R�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt
_set_tunables�sH

	



cCs�ddl}xu|j|jj|jj|jj�D]L}|jd�d}||jkr4|jj	d|�|j
d�q4q4WdS(Ni����RSis<a non-existing plugin (%s) was specified in the command linei(t	itertoolstchainR�RmRiRcRBR,R�tfatalR�(R-RZtpluginR((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_check_for_unknown_plugins�s	cCslxe|jD]Z\}}|j�\}}x9t||�D](\}}|jj||||f�q8Wq
WdS(N(R�tget_all_optionsRR�R(R-RR]tnamesRLtoptnametoptparm((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_set_plugin_options�s
cCs|jjd�t|j�rN|jjdt|j�t|j�f�n|jjdt|j��|jjd�dS(NRs %d profiles, %d pluginss %d profiles(RR6RR�Rn(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_report_profiles_and_plugins�s#cCs�|jr.|jr.|jjtd��dS|jr�|jjtd��|jjd�xP|jD],\}}|jjd||j�f�qgWn|jjtd��|jjd�|jr2|jjtd��|jjd�x@|jD]2\}}}|jjd|||j�f�q�Wn|jjd�|jro|jjtd��xE|jd	d	j	D]/}|jjd
|d	|d|df�qvW|jjd�|jjtd
��x�|jD]�\}}}}|dkr�q�nt
|d�tkr5|dtkr,d}q?d}n
|d}|jjd
|d|||df�q�Wn|jjtd��|jjd�t
|j�}	|	j�td|	dt�}
x"|
D]}|jjd|�q�W|j�dS(Nsno valid plugins founds,The following plugins are currently enabled:Rs	 %-20s %ssNo plugin enabled.s-The following plugins are currently disabled:s %-20s %-14s %ss4The following options are available for ALL plugins:is %-25s %-15s %siis+The following plugin options are available:ttimeouttpostprocRHtonRORStdescsNo plugin options available.s
Profiles: Rs %s(stimeoutspostproc(R�R�R�R\R�RR6tget_descriptionR�t_default_plug_optsR[RKR�R1RntsortR%Rd(R-R�R?t	plugclassR"RJRaRbttmpoptRnR!R"((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyRf�sX			-		
$

c	Cs|js#|jjtd��dS|jjtd��|jjd�d�}t|j�}|j�x�|D]�}g}xB|jD]7\}}||�r�||jkr�|j	|�q�q�Wt
d||dt�}x"|D]}|jjd|�q�WqrW|j�dS(Nsno valid profiles founds%The following profiles are available:RcSs
t|d�S(NRn(R�(tc((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt	_has_prof0ss%-15s Rs %s(
RnR�R\R�RR6R1RkR�RR%R�Rd(	R-RoRntprofileR)RR]R!R"((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyRg)s"		


cCsd|jjs&|jjtd��dS|jjtd��|jjd�x|jjj�D]�}|sqq_n|jj|�}|jjdd|j	f�|jjdd|j
f�|jr�|jjdd|jf�n|jj
dkrL|jj�}d}t||dtdd
�}x!|D]}|jj|�q/Wn|jjd�q_WdS(Nsno valid presets founds$The following presets are available:Rs%14s %ssname:sdescription:snote:is%14s soptions:RR Rs      options: (R�tpresetsR�R\R�RR6RXR�RRhtnoteR�Rrtto_argsR%R�(R-R�R�toptions_strR!R"((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR�?s(	 
RcCs|j}|j|�r0|jjd|�tS|p?|jj}|pQ|jj}y)|jd|d|d|d|j�Wn(t	k
r�}|jjd|�tSX|j
jd�}|j
d|!|j
|d	}|jjd
|dj
|�f�tS(s�Add a new command line preset for the current options with the
            specified name.

            :param name: the name of the new preset
            :returns: True on success or False otherwise
        s"A preset named '%s' already existsRRhRrR�sCould not add preset: %ss--add-presetiis"Added preset '%s' with options %s
R(R�R�RR�RR�RhRrt
add_presetR:R�tindexR6R�R�(R-RRhRrR�RFt	arg_indexR�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyRuWs 	)cCs�|j}|j|�s0|jjd|�tSy|jd|�Wn.tk
rt}|jjt|�d�tSX|jjd|�t	S(s�Delete a named command line preset.

            :param name: the name of the preset to delete
            :returns: True on success or False otherwise
        sPreset '%s' not foundRs
sDeleted preset '%s'
(
R�R�RR�Rt
del_presetR:R�R6R�(R-RR�RF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyRxts	cCs�|jjr(|jj|jj��n�|jj�}|td�7}yt|�Wnotk
r�}|jj	d�|j
d�n@tk
r�}|jjd�|jj	|�|j
|�nXdS(Ns,Press ENTER to continue, or CTRL-C to quit.
sExiting on user canceli�R(R�R\RR6R�tget_msgR�RR�R�R�R:(R-R�RF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR\�scCs�tj�}d}d|}tjj|j|�}|jjd|||f�|jjd|�|jj	d||dd�dS(Ns!caught exception in plugin methods%s-plugin-errors.txts%s "%s.%s()"swriting traceback to %ss%s
tmodeta(
R�t
format_excR2R�R�R�R�R�R�t
add_string(R-R]tmethodttraceR�tplugin_err_logtlogpath((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��s
cCsq|jj�y�|jjtd��d}|jj}||kr�dj|�}|jjd�|jjd|�|jjd	|�|jjd�|j	d
�n|j
�|j�dSWn�tt
fk
r}|jtkrdGHd|jGHdGHq`d|GH�nMtk
r_}|jjd�|jjd
�tj�|jj|�nX|j	d
�dS(Ns Setting up archive ...RNtbzip2tgziptxzs, RsInvalid compression specified: sValid types are: is %s while setting up archivesError setting up archive: %ss) Unexpected exception setting up archive:(sautoR�R�R�(R�tpre_workRR6R�R�RtR�R�R�R�R�tOSErrortIOErrorterrnotfatal_fs_errorststrerrorR:R�t	print_exc(R-tcompression_methodsR~tcompression_listRF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytprework�s8


	
cCsd}|jj|tddj|j�f�d}|jj|tddj|jj��f�|jjj�}dtd|jj	dj|�f}|jj|�|jjdtddj|jj��f�|j
jtd��x|jD]\}}yP|j
|_
|j�|j�|jj|j�|jjrU|j�nWq�tk
rl�q�ttfk
r�}|jtkr�|j
jd�|j
jd	|j�|j
jd�|jd
�n|j|d�q�tk
r
|j|d�q�Xq�WdS(Ns [%s:%s] executing 'sosreport %s'tsetupRs,[%s:%s] loaded options from config file: %s's'[%s:%s] using '%s' preset defaults (%s)s![%s:%s] effective options now: %ss Setting up plugins ...Rs %s while setting up pluginsi(R�R6R>R�R�R�RsR�R�RRR�R�R�tadd_default_collectionsR�R�R7t	_env_varsRstsetup_verifyR�R�R�R�R�R�R�R�R�R:(R-R�tpreset_argsR�R?RF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��s@)"#



cCsqg}|jdt�x1|jD]&\}}|jd||jf�q!W|jjddj|�dd�dS(sWFetch version information from all plugins and store in the report
        version files
sosreport: %ss%s: %stcontents
RDsversion.txtN(RR	R�tversionR�R}R�(R-tversionsR�R?((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR��scCs6|jjtd��|jjd�d}g|_g|_x5|jD]*}|d7}|jj||df�qHWy�t|jj	�|_
|j
j|jt
|j��}|j
jdt�x+|D]#}|s�|jjd|�q�q�W|jjd�Wn.tk
r1|jjd�tjd�nXdS(Ns! Running plugins. Please wait ...Riitwaits!Unexpected plugin task result: %ss
Exiting on user cancel
(RR6R�tpluglistt
running_plugsR�RRR�Rutplugpooltmapt_collect_pluginR1R�R�R�RaR�R�R2R�(R-tplugruncountREtresultstres((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytcollect�s*		


c	Cs�td���}yK|j|j|�}|j|dddjpFd}|jd|�Wnftk
r�|jj	d|d�|j
j|d�t|j|ddd_
|jj�nXWdQXtS(saWraps the collect_plugin() method so we can apply a timeout
        against the plugin as a wholeiiRes
 Plugin %s timed out
N(Rtsubmittcollect_pluginR�ReRMtresultRRR�R�R8R�t_timeout_hitt_threadstclear(R-R]tpoolttRe((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR�s"
c	Cs!y5|\}}|j|dd}|jj|�Wntk
rItSXt|j�}dd||f|ddjd�|jD��f}|j|�y�|j�y|j	j
|�Wntk
r�nXy|jj
|�Wntk
r�nXd}t|j	�t|j
j�krW|jrWddddjd	�|jD��f}n|jrt|j	rtd
}n|r�|j|�nWn�tk
r�nttfk
r�}|jtkr�|jjd|j�|jd�n|j|d�n!tk
r|j|d�nXdS(
Nis  Starting %-5s %-15s %ss%d/%ds
[Running: %s]Rcss|]}|VqdS(N((t.0R((s1/usr/lib/python2.7/site-packages/sos/sosreport.pys	<genexpr>/sRs  Finishing plugins %-12s %scss|]}|VqdS(N((R�R((s1/usr/lib/python2.7/site-packages/sos/sosreport.pys	<genexpr>Dss
  Finished running pluginss"
 %s while collecting plugin data
R�(R�R�RR:RRR�tui_progressR�R�R8RTR�R�RuRR�R�R�R�RR�R�R�R�(	R-R]RqR�R?tnumplugststatus_linetstatusRF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR�$sT

$



!	'	

cCso|jjdkr5|jjr5d|jd�}n
d|}|jjsktjj|�tjj�ndS(Nis
%siZs%s
(	R�RrR\tljustRoR�R�R�R8(R-R�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR�Ws
cCs�|js
dSdjgg|jD]:}tjj|�dk	r |dtjj|�f^q D]\}}d||f^q^�d}|jj|d�dS(Ns
s%ss%s=%stenvironment(R�R�R2tenvirontgetRMR�R}(R-RR�tenv((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytcollect_env_vars`s	ZcCs�t�}x]|jD]R\}}td|�}x$|jD]}|jt|��q8W|jrw|jt|j��nx9|jD].}|jt	d|ddd|d��q�WxW|j
D]L}|jtd|ddddtj
jd|j�d	|d
���q�WxH|jD]=\}}|jtd|dtj
jdd||���qW|j|�qWtdd
ftddftddff}	x�|	D]�\}
}}y^|j�}
|
|�j�}|
j|�|
j�|jj|
dtj
jd|��Wq�ttfk
r~}|jtkr|jj d�|jj d|j!|f�|jj d�|j"d�qq�Xq�WdS(NRtsrcpaththrefs..tdstpathtcmdtreturn_codeiR�R�tsos_stringsssos.txtttextssos.jsontJSONssos.htmltHTMLRDR�Rs %s while writing %s reporti(#R
R�RtalertstaddRtcustom_textRtcopied_filesRtexecuted_commandsRR2R�R�R�tcopy_stringsRRRRR�tunicodeR�R8R�RR�R�R�R�RR�R�R�(R-treportR�R?tsectiontalertR<R�R�t
formatlisttclass_tfilenamettype_R4toutputRF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytgenerate_reportsjsT			
	

cCs�x�|jD]�\}}y4|jd�r5|j�n|jjd|�Wq
ttfk
r�}|jtkr�|j	j
d�|j	j
d|j�|j	j
d�|jd�n|j
|d�q
tk
r�|j
|d�q
Xq
WdS(NRfsSkipping postproc for plugin %sRs% %s while post-processing plugin datai(R�t
get_optionRfR�R6R�R�R�R�RR�R�R�R�R:(R-R�R?RF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyRf�s 

cCs�|s
tSyed}t|d�}tj|�}x0trc|j|�}|sSPn|j|�q4W|j�Wntk
r�|j	�nX|j
�S(Niitrbi(RtopenthashlibR7R�treadR7R9R:R�t	hexdigest(R-R�t	hash_namet	hash_sizet
archive_fptdigestthashdata((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_create_checksum�s	
cCs?t|d|d�}|r1|j|d�n|j�dS(NRStws
(R�R�R9(R-R�R�tchecksumtfp((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_write_checksum�scCs|j�d}d}|jjstjd�}|jjsKtd�GHnz�y|jj	|jj
�}Wn�ttfk
r�}dGHtd|j
|jj�f�GHdGH|jtkr�|jd�q�n'tk
r�|jjr��q�tSnXWdtj|�Xn}|jj�}tjj|�}y2tjj|j|�}tj||�|}Wn'ttfk
r�td|�GHtSXd}|jjs�|s�dGHq�|jj�}|j||�}y|j|||�Wn&ttfk
rtd|�GHnXtjj|jtjj|��}	tj|�}
|d	|}|	d	|}ytj||	�|	}Wn'ttfk
r�td
|�GHtSXytj||�Wq�ttfk
r�td|�GHq�Xn|jjs|jj||||
�n|jj|||�|jj s2|jj!r�|jjs�y*|jj"|�|j#j$td��Wq�tk
r�}
|j#j%d
|
�q�Xq�d}|j#j%|�nt&j'�|j(r�|j(j)�n|j*r�tjj+|j*�r�t,|j*�nt-S(Ni?sCreating compressed archive...Rs %s while finalizing archive %sisError moving directory: %ss Creating archive tarball failed.s#Error writing checksum for file: %sRSsError moving archive file: %ssError moving checksum file: %ssUploaded archive successfullysUpload attempt failed: %ssEUnable to upload archive when using --build as no archive is created.(.RRMR�R]R2tumaskRoR�R�tfinalizeRtR�R�R�tget_archive_pathR�R�R�R:RaRR�tbasenameR�R�trenameR�tget_preferred_hash_nameR�R�tstattdisplay_resultstuploadt
upload_urltupload_archiveRR6R�R�R�R�R=R�R�RR�(R-R�t	directoryt	old_umaskRFtdir_namet	final_dirR�R�t
final_nametarchivestattarchive_hasht
final_hashterrR�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt
final_work�s�
	




	cCs'|js#|jjtd��tStS(Nsno valid plugins were enabled(R�R�R�R�RR�(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytverify_pluginsJs	cCsO|jr|jj�n|jr2|jj�n|jrKt|j�ndS(N(R�tcleanupR�R=R�R(R-((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt_cleanupPs			cCs2y�|jj|j��|j�|j�|j�|j�|j�|jj	rj|j	�t
�n|jjr�|j�t
�n|jjr�|j�t
�n|jj
r�|j
|jj
�S|jjr�|j|jj�S|j�s�tS|j�|j�|j�|j�|jjs7|j�n|jjsP|j�n|jjsi|j�n|jjd�|j�|j�SWn�tk
r�|jj r��n|j!�ndt"k
r�|jj#d�|j!�|j$d�n-t
k
r }|j!�t%j&|j'�nX|j$d�dS(Ns)Skipping postprocessing of collected datas
Exiting on user canceli�i((R�tset_commonsR�RGRMRYR^RcR�RfR�RgR�RuRxR�RR\R�R�R�RkR�RjR�RlRfRR6R�R�R�RaR�R�R�R�R�texittcode(R-RF((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytexecuteZs^





	
	
	












N(7R>R?RLR.R�R�R�R�R�R�R�tstaticmethodR�R�R�RMR�R�RRRRR RR#R$RGRMRYR^RcRdRfRgR�RuRxR\R�R�R�R�R�R�R�R�R�R�RfR�R�R�R�R�R�(((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyR�sf	g		
							-		
						U		0			
	;							"	)	
			3			
	9				{		
cCst|�}|j�dS(sThe main entry pointN(R�R�(R�R�((s1/usr/lib/python2.7/site-packages/sos/sosreport.pytmain�s(;RLR�R�R2R�R�RtargparseRRtsos.pluginsR�t
sos.utilitiesRRtshutilRR0R�tconcurrent.futuresRRR�RR�R	R
Rtsos.policiestsos.archiveRt
sos.reportingR
RRRRRRRRRR�t	six.movesRRtENOSPCtEROFSR�RR%R)tobjectR*R@R�R�R�R�(((s1/usr/lib/python2.7/site-packages/sos/sosreport.pyt<module>sFF		�����{