HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/kernel.cpython-38.pyc
U

i��d��@s>ddlmZmZmZddlmZddlZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOpt)�RedHatPolicyNc@sHeZdZdZdZdZdZdZdZe	ddd	d
�e	dddd
�gZ
d
d�ZdS)�Kernela�The Kernel plugin is aimed at collecting general information about
    the locally running kernel. This information should be distribution-neutral
    using commands and filesystem collections that are ubiquitous across
    distributions.

    Debugging information from /sys/kernel/debug is collected by default,
    however care is taken so that these collections avoid areas like
    /sys/kernel/debug/tracing/trace_pipe which would otherwise cause the
    sos collection attempt to appear to 'hang'.

    The 'trace' option will enable the collection of the
    /sys/kernel/debug/tracing/trace file specfically, but will not change the
    behavior stated above otherwise.
    zLinux kernel�kernel)�systemZhardwarer)�kernel$z/sys/module�
with-timerFzgather /proc/timer* statistics)�defaultZdesc�tracez+gather /sys/kernel/debug/tracing/trace filec*Cs�t|jt�rd|_|jdddd�|jdddd�|�d�z*|�|j�}|jdd�|�d	d
d�Wn$tk
r�|�	d|j�YnXd
ddg}g}|D]}|�
t�|��q�|r�|�dd�|��|jddgdd�|jddd�d}|�dddddddd d!d"d#g�|�
d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2|j��d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdH|dI|dJdKg(�|�dL��r�|�
dM�|�dN��s�|�dO�dS)PN)r	zkernel-redhat$zuname -a�uname)Zroot_symlink�tagsZlsmodzls -lt /sys/kernel/slabzmodinfo � Zmodinfo_ALL_MODULESZmodinfo_all)Zsuggest_filenamerzcould not list %sz/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updateszfind %s -lsZdmesgzdkms statusT)Z
cmd_as_tagz	sysctl -aZsysctl)rz-/sys/devices/system/clocksource/clocksource0/z$/sys/kernel/debug/tracing/trace_pipez /sys/kernel/debug/tracing/READMEz$/sys/kernel/debug/tracing/trace_statz!/sys/kernel/debug/tracing/per_cpuz /sys/kernel/debug/tracing/eventsz%/sys/kernel/debug/tracing/free_bufferz&/sys/kernel/debug/tracing/trace_markerz*/sys/kernel/debug/tracing/trace_marker_rawz</sys/kernel/debug/tracing/instances/*/per_cpu/*/snapshot_rawz;/sys/kernel/debug/tracing/instances/*/per_cpu/*/trace_pipe*z0/sys/kernel/debug/tracing/instances/*/trace_pipez
/proc/modulesz/proc/sys/kernel/random/boot_idz/sys/module/*/parametersz/sys/module/*/initstatez/sys/module/*/refcntz/sys/module/*/taintz/sys/module/*/versionz/sys/firmware/acpi/*z/sys/kernel/debug/tracing/*z/sys/kernel/livepatch/*z/proc/kallsymsz/proc/buddyinfoz/proc/slabinfoz/proc/zoneinfoz/lib/modules/%s/modules.depz/etc/conf.modulesz/etc/modules.confz/etc/modprobe.confz/etc/modprobe.dz/lib/modprobe.dz/run/modprobe.dz/usr/local/lib/modprobe.dz/etc/sysctl.confz
/etc/sysctl.dz
/lib/sysctl.dz
/proc/cmdlinez/proc/driverz/proc/sys/kernel/taintedz/proc/softirqsz/proc/lock*z
/proc/miscz/var/log/dmesgz/sys/fs/pstorez/var/lib/systemd/pstorez'/sys/kernel/debug/dynamic_debug/controlz(/sys/kernel/debug/extfrag/unusable_indexz'/sys/kernel/debug/extfrag/extfrag_indexZavailable_clocksourceZcurrent_clocksourcez/proc/pressure/r
z/proc/timer*rz/sys/kernel/debug/tracing/trace)�
isinstanceZpolicyr�verify_packagesZadd_cmd_output�listdir�
sys_module�join�OSErrorZ	_log_warn�extend�globZadd_forbidden_pathZ
add_copy_specZkernel_versionZ
get_option)�self�modulesZextra_mod_patternsZextra_mod_paths�patternZclocksource_path�r�;/usr/lib/python3/dist-packages/sos/report/plugins/kernel.py�setup-s�
�
�����+
zKernel.setupN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrrrZoption_listrrrrrrs���r)Zsos.report.pluginsrrrZsos.policies.distros.redhatrrrrrrr�<module>	s