HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/kernel.cpython-310.pyc
o

���b��@s2ddlmZmZmZddlZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOptNc@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)�system�hardwarer)zkernel$z/sys/module�
with-timerFzgather /proc/timer* statistics)�default�desc�tracez+gather /sys/kernel/debug/tracing/trace filecCs�|jddd�|jddd�|�d�z|�|j�}|jdd�|�dd	d
�Wnty9|�d|j�Ynwgd�}g}|D]
}|�t�|��qB|rY|�d
d�|��|jgd�dd�d}|�gd��|�	gd�d�d�d�d�d�d�d�d�d�d�d�d�d �d!|j
���d"�d#�d$�d%�d&�d'�d(�d)�d*�d+�d,�d-�d.�d/�d0�d1�d2�d3�|d4�|d5�d6��|�d7�r�|�	d8�|�d9�s�|�d:�dSdS);Nzuname -a�uname)�root_symlink�lsmodzls -lt /sys/kernel/slabzmodinfo � �modinfo_ALL_MODULES�modinfo_all)�suggest_filename�tagszcould not list %s)z/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updateszfind %s -ls)�dmesgz	sysctl -azdkms statusT)�
cmd_as_tagz-/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/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'/sys/kernel/debug/dynamic_debug/controlz(/sys/kernel/debug/extfrag/unusable_indexz'/sys/kernel/debug/extfrag/extfrag_index�available_clocksource�current_clocksourcez/proc/pressure/r	z/proc/timer*rz/sys/kernel/debug/tracing/trace)
�add_cmd_output�listdir�
sys_module�join�OSError�	_log_warn�extend�glob�add_forbidden_path�
add_copy_spec�policy�kernel_version�
get_option)�self�modules�extra_mod_patterns�extra_mod_paths�pattern�clocksource_path�r,�;/usr/lib/python3/dist-packages/sos/report/plugins/kernel.py�setup,s�

��
���������	�
���
������������������� �!�"�#�$�
'

�zKernel.setupN)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�verify_packagesrr�option_listr.r,r,r,r-r
s���r)�sos.report.pluginsrrrr rr,r,r,r-�<module>s