a >hd@s>ddlZddlmZddlmZmZmZGdddeeZdS)N) RedHatPolicy)PluginIndependentPlugin PluginOptc@sHeZdZdZdZdZdZdZdZe ddd d e d dd d gZ d dZ 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 kernelkernel)systemZhardwarer)kernel$z /sys/module with-timerFzgather /proc/timer* statistics)defaultZdesctracez+gather /sys/kernel/debug/tracing/trace filec2Cst|jtrd|_|jdddd|jdddd|dz*||j}|jdd|d d d Wn$t y| d |jYn0gd }g}|D]}| t |q|r|dd|d|jgddd|jdddd}| gd|ddddddddd d!d"d#d$d%d&|jd'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;dd?d@dAdB|dC|dDdEdF|jg.|dGr|dH|dIs| dJdS)KN)r zkernel-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 -ls)Zdmesgzdmesg -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