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__/pulp.cpython-310.pyc
o

-�_g��@sBddlmZddlmZddlmZmZmZGdd�dee�ZdS)�)�match)�quote)�Plugin�RedHatPlugin�	PluginOptc@sTeZdZdZdZdZdZedddd�gZd	Z	d
Z
dZdZdd
�Z
dd�Zdd�ZdS)�Pulpz
Pulp platform�pulp)zpulp-serverzpulp-katellozpython3-pulpcore)�/etc/pulp/settings.py�tasks��z*number of tasks to collect from DB queries)�default�desc�	localhost�27017�cCs�d}d}zutdddd��}|����}Wd�n1swY|D]S}td|�rC|��d�d	�d
�d�}|d
|_|d|_td|�rRd
|��d��|_td|�rad|��d��|_|�	d�rhd}|rw|�	d�rw|��d}d}q$Wn	t
y�Ynw|�ddi�|�gd��|�
d�}|�d|�d��}|�d|�d��}	|�d|�d��}
|�d�}|�d�}|j|dd�|j|	dd�|j|
d d�|j|d!d�|j|d"d�d#D]}
|jd$|
�d%|�d&�d'|
��d(�q�|jd)d*d�dS)+NrFz/etc/pulp/server.conf�rzUTF-8)�encodingz^\s*seeds:\s+\S+:\S+��,r�:z\s*username:\s+\S+z-u z\s*password:\s+\S+z-p z[messaging]Tz	certfile:z/etc/default/pulp_workers�pulp_worker_defaults)z/etc/pulp/*.confr	�/etc/pulp/settings.local.pyz /etc/pulp/server/plugins.conf.d/z/etc/default/pulp*z/var/log/httpd/pulp-http.log*z/var/log/httpd/pulp-https.log*z(/var/log/httpd/pulp-http_access_ssl.log*z)/var/log/httpd/pulp-https_access_ssl.log*z'/var/log/httpd/pulp-http_error_ssl.log*z(/var/log/httpd/pulp-https_error_ssl.log*r
z"DBQuery.shellBatchSize=zG;; db.task_status.find().sort({finish_time: -1}).pretty().shellPrint()"z6;; db.reserved_resources.find().pretty().shellPrint()"zK;; db.task_status.find({state:{\$ne: \"finished\"}}).pretty().shellPrint()"a�"function humanReadable(bytes) {  var i = -1;  var byteUnits = ['kB', 'MB', 'GB', 'TB', 'PB',                    'EB', 'ZB', 'YB'];  do {      bytes = bytes / 1024;      i++;  } while (bytes > 1024);  return Math.max(bytes, 0.1).toFixed(1) + ' ' + byteUnits[i];};var collectionNames = db.getCollectionNames(), stats = [];collectionNames.forEach(function (n) {                          stats.push(db[n].stats());                        });stats = stats.sort(function(a, b) {                     return b['size'] - a['size']; });for (var c in stats) {  print(stats[c]['ns'] + ': ' +        humanReadable(stats[c]['size']) + ' (' +        humanReadable(stats[c]['storageSize']) + ')'); }"z"db.stats()"zmongo-task_status)�suggest_filenamezmongo-reserved_resourceszpulp-running_taskszmongo-collection_sizeszmongo-db_stats�quczqpid-stat -z --ssl-certificate=z -b amqps://localhost:5671�
qpid_stat_)�tagszosudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' dynaconf list�
dynaconf_list)�open�read�
splitlinesr�split�dbhost�dbport�dbuser�
dbpassword�
startswith�IOError�
add_file_tags�
add_copy_spec�
get_option�build_mongo_cmd�add_cmd_output)�self�messaging_cert_file�in_messaging_section�file�
pulp_lines�line�uri�	num_tasks�mtasks�mres�prun�csizes�dbstats�opt�r:�9/usr/lib/python3/dist-packages/sos/report/plugins/pulp.py�setup!sv
�





����

�
�
��
��
�z
Pulp.setupcCs@d}d|j�d|j�d|j�d|j��}d}|t|||f�S)z Build mongoDB command z
bash -c %sz--host z --port � z mongo pulp_database %s --eval %s)r!r"r#r$r)r,�query�_cmd�_mondb�_moncmdr:r:r;r*�s�zPulp.build_mongo_cmdcCsbd}d}|�d||�d}d}|�d||�d}d}|�d||�|�d	||�|�d
||�dS)Nz0(([a-z].*(passw|token|cred|secret).*)\:(\s))(.*)z\1 ********z/etc/pulp/(.*)\.conf$z7(\s*\".*(passw|cred|token|secret).*\"\s*:(\s))(.*)(\w+)z
\1********z/etc/pulp(.*)(.json$)z_((?:SECRET_KEY|AUTH_LDAP_BIND_PASSWORD)(?:\<.+\>)?(\s*=)?|(password|PASSWORD)(\"|'|:)+)\s*(\S*)r	rz
dynaconf list)�do_path_regex_sub�do_cmd_output_sub)r,�etcreg�repl�jreg�key_pass_rer:r:r;�postproc�s�z
Pulp.postprocN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�packages�filesr�option_listr!r"r#r$r<r*rHr:r:r:r;rs ��vrN)	�rer�shlexr�sos.report.pluginsrrrrr:r:r:r;�<module>s


https://t.me/RX1948 - 2025