????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/gluster.pyc

�
Dr^c@soddlZddlZddlZddlZddlZddlmZmZdeefd��YZdS(i����N(tPlugintRedHatPlugintGlustercBszeZdZdZdZdZddgZddgZd	d
defgZ	d�Z
d
�Zd�Zd�Z
d�ZRS(sGlusterFS storagetglustertstoragetvirts/tmp/glusterfs-statedumpst	glusterfssglusterfs-cores
/etc/glusterds/var/lib/glusterdtdumpsenable glusterdump supporttslowcCsig}t|d�}xC|j�D]5}|jd�s=q"n|dd!}|j|�q"W|j�|S(s�Return a dictionary for which key are volume names according to the
        output of gluster volume info stored in volume_file.
        trsVolume Name:ii����(topent	readlinest
startswithtappendtclose(tselftvolume_filetouttfptlinetvolname((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pytget_volume_namess

cCsjytj|�Wntk
r$nXtdd�}d|d}|j|�|jd�|j�dS(Ns/tmp/glusterdump.optionstwspath=s
sall=yes(tostmkdirtOSErrorR
twriteR(Rtname_dirRtdata((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pytmake_preparations+s


cCs�d}tj|�}xd|D]\}|d}d}xC|dkrwt|d|d�j�d}tj|d�}q5WqWdS(Niii����t/R	t
DUMP_END_TIME(RtlistdirtfileRtstringtcount(RRtstatedumps_presenttstatedump_entrieststatedump_filetrett	last_line((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pytwait_for_statedump6s

cCs�tjj|j�sdSy]x9tj|j�D]%}tjtjj|j|��q/Wtj|j�tjd�Wnt	k
r�nXdS(Ns/tmp/glusterdump.options(
Rtpathtexistst
statedump_dirR tremovetjointrmdirtunlinkR(Rtdirs((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pytpostprocAs#
cCs�|jd�|jd�|jddddddgtjd	��|jd
�sg|jd�}nd}|r�xQtjd
�tjd�tjd�D]}|j||�q�Wn
|jd�|jd�rE|j|j�|jd�r2tj	d�|j
|j�|jd�|j|j�qE|jjd�n|j
d�}|r�x_|j|�D]K}|jd|d|d|d|d|d|d|d|g�qjWn|jd�|jd �dS(!Ns,/var/lib/glusterd/geo-replication/secret.pemsgluster peer statuss/etc/redhat-storage-releases/etc/swift/s/etc/glusterd.rpmsaves/etc/glusterfss/var/lib/glusterd/s,/var/run/gluster/shared_storage/nfs-ganesha/s/var/run/gluster/*tier-dht/*tall_logstlog_sizeis/var/log/glusterfs/*logs/var/log/glusterfs/*/*logs)/var/log/glusterfs/geo-replication/*/*logs/var/log/glusterfsRs"killall -USR1 glusterfs glusterfsdis/tmp/glusterdump.optionss=could not send SIGUSR1 to glusterfs                 processessgluster volume infos(gluster volume geo-replication %s statussgluster volume heal %s infos'gluster volume heal %s info split-brainsgluster snapshot list %ssgluster volume quota %s lists"gluster volume rebalance %s statussgluster snapshot info %ssgluster snapshot status %ssgluster pool listsgluster volume status(tadd_forbidden_pathtadd_cmd_outputt
add_copy_spectglobt
get_optionRR,tcheck_ext_progttimetsleepR)tsoslogtinfotget_cmd_output_nowR(RtlimittfRR((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pytsetupLsT




	

(RR(t__name__t
__module__t__doc__tplugin_nametprofilesR,tpackagestfilestFalsetoption_listRRR)R2RB(((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pyRs				(	R;tos.pathRR8R"tsos.pluginsRRR(((s7/usr/lib/python2.7/site-packages/sos/plugins/gluster.pyt<module>	s