NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/gluster.cpython-36.pyc
3

~�gX�@s:ddlZddlZddlmZmZmZGdd�dee�ZdS)�N)�Plugin�RedHatPlugin�	PluginOptc@sDeZdZdZdZdZdZdZdZe	d
ddd
�gZ
dd�Zdd�ZdS)�GlusterzGlusterFS storageZgluster�storage�virtz/run/gluster�	glusterfs�glusterfs-core�
/etc/glusterd�/var/lib/glusterd�dumpFzenable glusterdump support)�defaultZdesccCs�|jd�r�|j|j�sdSyBtj|jd�}|jtj|jd��x|D]}tj|�qHWWn2tk
r�}z|jd|���WYdd}~XnXdS)Nrz/*.dump.[0-9]*z/glusterd_state_[0-9]*_[0-9]*z"Could not remove statedump files: )	�
get_option�path_exists�
statedump_dir�glob�extend�os�remove�OSErrorZ
_log_error)�selfZremove_files�name�err�r�/usr/lib/python3.6/gluster.py�postprocs


zGluster.postprocc
Cs�|jd�|jd�|jddd�|jd�|jddd�|jd	d
ddd
ddgtjd��|jd�sx|jdddg�n
|jd�|jd�r�|j|j�r�|jd�r�|j|j�n|jj	d|j�|j
d�}|ddkr�|dj�d1}|j|�|jddd�}|ddk�r�x�|dj
�D]�}|jd ��s.�q|d!d�}|jd"|�d#�d$|�d%�d&|�d'�d&|�d(�d)|�d*�d+|��d,|�d-�d.|�d%�d/|��d0|��g
��qWdS)2Nz,/var/lib/glusterd/geo-replication/secret.pemz6/var/lib/glusterd/glusterfind/glusterfind_*_secret.pemzgluster peer statusZgluster_peer_status)Ztagszgluster pool listzgluster volume statusZgluster_v_statusz/etc/redhat-storage-releasez/etc/swift/z/etc/glusterd.rpmsavez/etc/glusterfsz/var/lib/glusterd/z(/run/gluster/shared_storage/nfs-ganesha/z$/var/lib/glusterd/glusterfind/.keys/z/run/gluster/*tier-dht/*Zall_logsz/var/log/glusterfs/*logz/var/log/glusterfs/*/*logz)/var/log/glusterfs/geo-replication/*/*logz/var/log/glusterfsrzgluster(fs|fsd|d)z4Unable to generate statedumps, no such directory: %szgluster get-stateZstatusr�output�zgluster volume infoZgluster_v_infozVolume Name:�zgluster volume get z allzgluster volume geo-replication z statuszgluster volume heal z infoz info split-brainzgluster volume status z clientszgluster snapshot list zgluster volume quota z listzgluster volume rebalance zgluster snapshot info zgluster snapshot status ���)Zadd_forbidden_pathZadd_cmd_outputZ
add_copy_specrrrrZsignal_process_usr1ZsoslogZwarningZexec_cmd�splitZcollect_cmd_output�
splitlines�
startswith)r�stateZ
state_fileZ
volume_cmd�lineZvolnamerrr�setup*sd















z
Gluster.setupN)rr)rr	)r
r)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesrZpackages�filesrZoption_listrr%rrrrrs
r)rrZsos.report.pluginsrrrrrrrr�<module>	s

NineSec Team - 2022