Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/kernel.cpython-36.pyc

3

�f��@s>ddlZddlmZddlmZmZmZGdd�dee�ZdS)�N)�RedHatPolicy)�Plugin�IndependentPlugin�	PluginOptc@sHeZdZdZdZdZdZdZdZe	dd	d
d�e	dd	d
d�gZ
dd�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�hardware�kernel$z/sys/modulez
with-timerFzgather /proc/timer* statistics)�defaultZdesc�tracez+gather /sys/kernel/debug/tracing/trace filec3Cs�t|jt�rdS|_|jdddd�|jdddd�|jd�y*|j|j�}|jdd	j|�d
dd�Wn$tk
r�|j	d
|j�YnXdddg}g}x|D]}|j
tj|��q�W|r�|jdd	j|��|jddgdd�|jddd�d}|jddddddd d!d"d#d$g�|j
d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3|jj��d4�d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJ|dK|dLdMdN|jj���g)�|jdO��r�|j
dP�|jdQ��s�|jdR�dS)TN�kernel$�kernel-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/z/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/z
/boot/config-z
with-timerz/proc/timer*rz/sys/kernel/debug/tracing/trace)r
r)�
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.6/kernel.py�setup-s�


zKernel.setupN)rr	r)r
)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrrrZoption_listrrrrrrs
r)rZsos.policies.distros.redhatrZsos.report.pluginsrrrrrrrr�<module>	s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists