o
G%@id @ s> d dl Z d dlmZ d dlmZmZmZ G dd deeZdS ) N)RedHatPolicy)PluginIndependentPlugin PluginOptc @ sH e Zd ZdZdZdZdZdZdZe ddd d
e dddd
gZ
d
d 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.
zLinux kernelkernel)systemhardwarer )kernel$z/sys/module
with-timerFzgather /proc/timer* statistics)defaultdesctracez+gather /sys/kernel/debug/tracing/trace filec C s t | jtr d| _| jdddd | jdddd | d z| | j}| jdd| d d
d W n t yE |
d| j Y nw g d
}g }|D ]
}|t| qN|rg| dd| d | jg ddd | jddd d}|
g d | g ddddddddd d!d"d#d$d%d&| j d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdB|dC |dD dEdF| j | dGr| dH | dIs |
dJ d S d S )KN)r
zkernel-redhat$zuname -auname)root_symlinktagslsmodz/sys/kernel/slabzmodinfo modinfo_ALL_MODULESmodinfo_all)suggest_filenamer zcould not list )z/lib/modules/*/extraz/lib/modules/*/updatesz/lib/modules/*/weak-updateszfind z -ls)dmesgzdmesg -Tzdkms statusT)
cmd_as_tagz sysctl -asysctl)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