3 ܓid@s>ddlZddlmZddlmZmZmZGdddeeZdS)N) RedHatPolicy)PluginIndependentPlugin PluginOptc@sHeZdZdZdZdZdZdZdZe dd d d e d d d d gZ ddZ dS)KernelaThe 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 kernelkernelsystemhardwarekernel$z /sys/modulez with-timerFzgather /proc/timer* statistics)defaultZdesctracez+gather /sys/kernel/debug/tracing/trace filec8Cst|jtrdZ|_|jdddd|jdddd|jdy*|j|j}|jdd j|d d d Wn&t k r|j d |jYnXdddg}g}x|D]}|j t j |qW|r|jdd j|d|jdddgdd|jdddd}|j ddddd d!d"d#d$d%d&g |jd'd(d)d*d+d,d-d.d/d0d1d2d3d4d5|jjd6d7d8d9d:d;dd?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQ|dR|dSdTdU|jjg.|jdVr|jdW|jdXs|j dYdS)[Nkernel$kernel-redhat$zuname -auname)Z root_symlinktagsZlsmodz/sys/kernel/slabzmodinfo  Zmodinfo_ALL_MODULESZ modinfo_all)Zsuggest_filenamerzcould not list z/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updateszfind z -lsZdmesgzdmesg -Tz dkms 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 s