
    ~ g                     D    S SK r S SKJr  S SKJrJrJr   " S S\\5      rg)    N)RedHatPolicy)PluginIndependentPlugin	PluginOptc                   R    \ rS rSrSrSrSrSrSrSr	\
" SS	S
S9\
" SS	SS9/rS rSrg)Kernel   a}  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
   )kernel$z/sys/module
with-timerFzgather /proc/timer* statistics)defaultdesctracez+gather /sys/kernel/debug/tracing/trace filec                    [        U R                  [        5      (       a  SU l        U R	                  SSSS9  U R	                  SSSS9  U R                  S5         U R                  U R                  5      nU R	                  SSR                  U5      -   S	S
S9  / SQn/ nU H(  nUR                  [        R                  " U5      5        M*     U(       a$  U R	                  SSR                  U5       S35        U R	                  / SQSS9  U R	                  SSS9  SnU R                  / SQ5        U R                  / SPSPSPSPSPSPSPSPS PS!PS"PS#PS$PS%PS&U R                  R                  5        S'3PS(PS)PS*PS+PS,PS-PS.PS/PS0PS1PS2PS3PS4PS5PS6PS7PS8PS9PS:PS;PS<PS=PS>PUS?-   PUS@-   PSAPSBU R                  R                  5        3P5        U R!                  SC5      (       a  U R                  SD5        U R!                  SE5      (       d  U R                  SF5        g g ! [         a"    U R                  SU R                   35         GNf = f)GN)r   zkernel-redhat$zuname -auname)root_symlinktagslsmodz/sys/kernel/slabzmodinfo  modinfo_ALL_MODULESmodinfo_all)suggest_filenamer   zcould not list )z/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updateszfind z -ls)dmesgzdmesg -Tzdkms statusT)
cmd_as_tagz	sysctl -asysctl)r   z-/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_indexz/sys/kernel/debug/hv-balloonavailable_clocksourcecurrent_clocksourcez/proc/pressure/z/boot/config-r   z/proc/timer*r   z/sys/kernel/debug/tracing/trace)
isinstancepolicyr   verify_packagesadd_cmd_outputadd_dir_listinglistdir
sys_modulejoinOSError	_log_warnextendglobadd_forbidden_pathadd_copy_speckernel_version
get_option)selfmodulesextra_mod_patternsextra_mod_pathspatternclocksource_paths         ;/usr/lib/python3/dist-packages/sos/report/plugins/kernel.pysetupKernel.setup-   s    dkk<00#@D  	JW7KG'H/0	@ll4??3G
SXXg-> >1F%2   4

 )G""499W#56 * %(A'B$ GH 
 	 	 	
 	Kh7J !
 	 	 +
+
-+
 '+
 &	+

 #+
 "+
 $+
 #+
 *+
 &+
 +
 +
 +
 +
 DKK6689F+
   !+
"  #+
$ !%+
& '+
( )+
* ++
, (-+
. /+
0 1+
2 3+
4 5+
6 7+
8 '9+
: ;+
< =+
> ?+
@ A+
B C+
D &E+
F 6G+
H 7I+
J 6K+
L +M+
N 66O+
P 44Q+
R S+
T DKK6689:U+
 +	Z ??<(( ~.w''##$EF (s  	@NN_T__,=>?	@s   >H! !(II)r"   N)__name__
__module____qualname____firstlineno____doc__
short_descplugin_nameprofilesr"   r&   r   option_listr7   __static_attributes__     r6   r   r      sQ      JK/H"OJ 	,7	9'5D	FKjGrD   r   )r+   sos.policies.distros.redhatr   sos.report.pluginsr   r   r   r   rC   rD   r6   <module>rG      s&     4 C CIGV& IGrD   