HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/slurm.cpython-36.pyc
3

3��d�
�@s8ddlmZmZmZddlmZGdd�deee�ZdS)�)�Plugin�UbuntuPlugin�RedHatPlugin)�
is_executablec@s0eZdZdZdZdZdZdZdd�Zd
d�Z	dS)�SlurmzSlurm Workload Manager�slurm�hpc�	slurm-wlm�slurmd�slurmdbd�	slurmctld�slurm-slurmctld�slurm-slurmd�slurm-slurmdbdc	Csl|jd�td�r |jddg�td�r4|jdg�ddd	d
ddd
ddddddddddg}td�rv|jdd�|D��d}d}d}yxt|d��d}x\|j�j�D]L}|s�q�|jd�}|d j�d!kr�|d"j�}|d j�d#kr�|d"j�}q�WWd$QRXWn6tk
�r0}z|j	d%||f�WYd$d$}~XnX|j
d&��sN|j||g�n|j|�d'�|�d'�g�d$S)(z  Slurm Workload Manager
        z/etc/slurm/*.confZsinfoz!sinfo --all --list-reasons --longzsinfo --all --longZsqueuezsqueue --all --long�aliasesZ	assoc_mgrZbbstatZburstBuffer�configZdaemonsZdwstatZ
federationZfrontendZjobZlicensesZnode�	partitionZreservationr
�stepZtopologyZscontrolcSsg|]}d|���qS)zscontrol show �)�.0�irr�/usr/lib/python3.6/slurm.py�
<listcomp>LszSlurm.setup.<locals>.<listcomp>z/etc/slurm/slurm.confz/var/log/slurmd.logz/var/log/slurmctld.log�r�=rZ
SlurmdLogFile�ZSlurmctldLogFileNzCould not open conf file %s: %sZall_logs�*)Z
add_copy_specrZadd_cmd_output�open�read�
splitlines�split�strip�IOErrorZ
_log_errorZ
get_option)	�selfZ
scontrol_cmdsZconfig_fileZslurmd_log_fileZslurmctld_log_fileZcf�lineZwords�errorrrr�setup%sf


zSlurm.setupcCsNd}ddg}ddj|�}d}d}|j|�d�||�|j|�d	�||�dS)
Nz
/etc/slurmZAccountingStoragePassZJobCompPassz(^\s*(%s)\s*=\s*)(.*)�|z(^\s*(StoragePass)\s*=\s*)(.*)z
\1********z/slurm.confz/slurmdbd.conf)�joinZdo_file_sub)r#Z
conf_pathsZ
slurm_keysZslurm_keys_regexZslurmdbd_key_regex�subrrr�postprocmszSlurm.postprocN)r)r	r
rrrr
rr)r
rr)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesZservicesr&r*rrrrr
s HrN)Zsos.report.pluginsrrrZ
sos.utilitiesrrrrrr�<module>	s