o id@s>ddlmZmZmZddlmZddlZGdddeeZdS))PluginIndependentPlugin PluginOpt) RedHatPolicyNc@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)systemhardwarer)kernel$z /sys/module with-timerFzgather /proc/timer* statistics)defaultdesctracez+gather /sys/kernel/debug/tracing/trace filecCst|jtr d|_|jdddd|jdddd|dz||j}|jdd|d d d WntyD| d |jYnwgd }g}|D] }| t |qM|rd|dd||jddgdd|jdddd}| gd| gddddddddd d!d"d#d$d%d&|jd'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<|d=|d>d?|d@r| dA|dBs| dCdSdS)DN)r zkernel-redhat$zuname -auname) root_symlinktagslsmodzls -lt /sys/kernel/slabzmodinfo  modinfo_ALL_MODULES modinfo_all)suggest_filenamerzcould not list %s)z/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updatesz find %s -lsdmesgz dkms statusT) cmd_as_tagz sysctl -asysctl)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_rawzs