https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/postgresql.cpython-310.pyc
o

-�_gu�@sjddlZddlmZmZmZmZmZddlmZGdd�de�Z	Gdd�de	e�Z
Gdd	�d	e	ee�ZdS)
�N)�Plugin�UbuntuPlugin�DebianPlugin�RedHatPlugin�	PluginOpt)�findc@s�eZdZdZdZdZdZdZedddd	�ed
de	dd
�edde	ded
�edde	dd
�edde	dd
�edde
dd
�gZddd�Zdd�Z
dS)�
PostgreSQLzPostgreSQL RDBMS�
postgresql)�services)r	zpostgresql-commonz' (password visible in process listings)�pghomez/var/lib/pgsqlzpsql server home directory)�default�desc�username�postgreszusername for pg_dump)r�val_typer
�password�zpassword for pg_dump�dbnamez"database name to dump with pg_dump�dbhostz.database hostname/IP address (no unix sockets)�dbporti8zdatabase server listening port�
pgdump.tarc
Cs�|�d�rb|�d�sdtjvrU|�d�r|�d�tjd<|�d�r<d|�d��d|�d��d|�d	��d
|�d���}nd|�d��d
|�d���}|j||dd
d�dS|j�d�|�d�dSdS)z- Extract PostgreSQL database into a tar file rr�
PGPASSWORDrzpg_dump -U rz -h z -p rz	 -w -F t zpg_dump -C -U Tr)�suggest_filename�binary�	sizelimitz-password must be supplied to dump a database.z3WARN: password must be supplied to dump a database.N)�
get_option�os�environ�add_cmd_output�soslog�warning�	add_alert)�self�filename�cmd�r%�?/usr/lib/python3/dist-packages/sos/report/plugins/postgresql.py�
do_pg_dump0s2


����
����zPostgreSQL.do_pg_dumpcCs"|��|�d|�d����dS)Nzdu -sh r)r'rr�r"r%r%r&�setupNszPostgreSQL.setupN)r)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packages�password_warn_textr�str�int�option_listr'r)r%r%r%r&rs6�������
rc�eZdZ�fdd�Z�ZS)�RedHatPostgreSQLc	szt���|�d�}|g}|D]+}td|�D]}|�|�qtd|�D]}|�|�q#dD]}|�|�|d|��q-qdS)Nrz*.logz*.conf)�
PG_VERSIONzpostmaster.opts�data)�superr)rr�
add_copy_spec�	path_join)r"r�dirs�_dirr#�file��	__class__r%r&r)Us

��zRedHatPostgreSQL.setup�r*r+r,r)�
__classcell__r%r%r?r&r6S�r6cr5)�DebianPostgreSQLcst���|�gd��dS)N)z/var/log/postgresql/*.logz/etc/postgresql/*/main/*.confz%/var/lib/postgresql/*/main/PG_VERSIONz*/var/lib/postgresql/*/main/postmaster.opts)r9r)r:r(r?r%r&r)ks
zDebianPostgreSQL.setuprAr%r%r?r&rDirCrD)r�sos.report.pluginsrrrrr�
sos.utilitiesrrr6rDr%r%r%r&�<module>s=

https://t.me/RX1948 - 2025