Documentation ¶
Overview ¶
Package kernel holds kernel related files
Index ¶
- Variables
- type Version
- func (k *Version) HaveFentryNoDuplicatedWeakSymbols() bool
- func (k *Version) HaveFentrySupport() bool
- func (k *Version) HaveFentrySupportWithStructArgs() bool
- func (k *Version) HaveLegacyPipeInodeInfoStruct() bool
- func (k *Version) HaveMmapableMaps() bool
- func (k *Version) HavePIDLinkStruct() bool
- func (k *Version) HaveRingBuffers() bool
- func (k *Version) IsAmazonLinux2022Kernel() bool
- func (k *Version) IsAmazonLinux2023Kernel() bool
- func (k *Version) IsAmazonLinuxKernel() bool
- func (k *Version) IsCOSKernel() bool
- func (k *Version) IsDebianKernel() bool
- func (k *Version) IsInRangeCloseOpen(begin kernel.Version, end kernel.Version) bool
- func (k *Version) IsOpenSUSELeap15_3Kernel() bool
- func (k *Version) IsOpenSUSELeapKernel() bool
- func (k *Version) IsOracleUEKKernel() bool
- func (k *Version) IsRH7Kernel() bool
- func (k *Version) IsRH8Kernel() bool
- func (k *Version) IsRH9Kernel() bool
- func (k *Version) IsRH9_3Kernel() bool
- func (k *Version) IsRH9_4Kernel() bool
- func (k *Version) IsSLESKernel() bool
- func (k *Version) IsSuse12Kernel() bool
- func (k *Version) IsSuse15Kernel() bool
- func (k *Version) IsSuseKernel() bool
- func (k *Version) IsUbuntuKernel() bool
- func (k *Version) String() string
- func (k *Version) SupportBPFSendSignal() bool
- func (k *Version) SupportCORE() bool
- func (k *Version) UbuntuKernelVersion() *kernel.UbuntuKernelVersion
Constants ¶
This section is empty.
Variables ¶
var ( // Kernel4_9 is the KernelVersion representation of kernel version 4.9 Kernel4_9 = kernel.VersionCode(4, 9, 0) // Kernel4_10 is the KernelVersion representation of kernel version 4.10 Kernel4_10 = kernel.VersionCode(4, 10, 0) // Kernel4_12 is the KernelVersion representation of kernel version 4.12 Kernel4_12 = kernel.VersionCode(4, 12, 0) // Kernel4_13 is the KernelVersion representation of kernel version 4.13 Kernel4_13 = kernel.VersionCode(4, 13, 0) // Kernel4_14 is the KernelVersion representation of kernel version 4.14 Kernel4_14 = kernel.VersionCode(4, 14, 0) // Kernel4_15 is the KernelVersion representation of kernel version 4.15 Kernel4_15 = kernel.VersionCode(4, 15, 0) // Kernel4_16 is the KernelVersion representation of kernel version 4.16 Kernel4_16 = kernel.VersionCode(4, 16, 0) // Kernel4_18 is the KernelVersion representation of kernel version 4.18 Kernel4_18 = kernel.VersionCode(4, 18, 0) // Kernel4_19 is the KernelVersion representation of kernel version 4.19 Kernel4_19 = kernel.VersionCode(4, 19, 0) // Kernel4_20 is the KernelVersion representation of kernel version 4.20 Kernel4_20 = kernel.VersionCode(4, 20, 0) // Kernel5_0 is the KernelVersion representation of kernel version 5.0 Kernel5_0 = kernel.VersionCode(5, 0, 0) // Kernel5_1 is the KernelVersion representation of kernel version 5.1 Kernel5_1 = kernel.VersionCode(5, 1, 0) // Kernel5_2 is the KernelVersion representation of kernel version 5.2 Kernel5_2 = kernel.VersionCode(5, 2, 0) // Kernel5_3 is the KernelVersion representation of kernel version 5.3 Kernel5_3 = kernel.VersionCode(5, 3, 0) // Kernel5_4 is the KernelVersion representation of kernel version 5.4 Kernel5_4 = kernel.VersionCode(5, 4, 0) // Kernel5_5 is the KernelVersion representation of kernel version 5.5 Kernel5_5 = kernel.VersionCode(5, 5, 0) // Kernel5_6 is the KernelVersion representation of kernel version 5.6 Kernel5_6 = kernel.VersionCode(5, 6, 0) // Kernel5_7 is the KernelVersion representation of kernel version 5.7 Kernel5_7 = kernel.VersionCode(5, 7, 0) // Kernel5_8 is the KernelVersion representation of kernel version 5.8 Kernel5_8 = kernel.VersionCode(5, 8, 0) // Kernel5_9 is the KernelVersion representation of kernel version 5.9 Kernel5_9 = kernel.VersionCode(5, 9, 0) // Kernel5_10 is the KernelVersion representation of kernel version 5.10 Kernel5_10 = kernel.VersionCode(5, 10, 0) // Kernel5_11 is the KernelVersion representation of kernel version 5.11 Kernel5_11 = kernel.VersionCode(5, 11, 0) // Kernel5_12 is the KernelVersion representation of kernel version 5.12 Kernel5_12 = kernel.VersionCode(5, 12, 0) // Kernel5_13 is the KernelVersion representation of kernel version 5.13 Kernel5_13 = kernel.VersionCode(5, 13, 0) // Kernel5_14 is the KernelVersion representation of kernel version 5.14 Kernel5_14 = kernel.VersionCode(5, 14, 0) // Kernel5_15 is the KernelVersion representation of kernel version 5.15 Kernel5_15 = kernel.VersionCode(5, 15, 0) // Kernel5_16 is the KernelVersion representation of kernel version 5.16 Kernel5_16 = kernel.VersionCode(5, 16, 0) // Kernel5_17 is the KernelVersion representation of kernel version 5.17 Kernel5_17 = kernel.VersionCode(5, 17, 0) // Kernel5_18 is the KernelVersion representation of kernel version 5.18 Kernel5_18 = kernel.VersionCode(5, 18, 0) // Kernel5_19 is the KernelVersion representation of kernel version 5.19 Kernel5_19 = kernel.VersionCode(5, 19, 0) // Kernel6_0 is the KernelVersion representation of kernel version 6.0 Kernel6_0 = kernel.VersionCode(6, 0, 0) // Kernel6_1 is the KernelVersion representation of kernel version 6.1 Kernel6_1 = kernel.VersionCode(6, 1, 0) // Kernel6_2 is the KernelVersion representation of kernel version 6.2 Kernel6_2 = kernel.VersionCode(6, 2, 0) // Kernel6_3 is the KernelVersion representation of kernel version 6.3 Kernel6_3 = kernel.VersionCode(6, 3, 0) // Kernel6_5 is the KernelVersion representation of kernel version 6.5 Kernel6_5 = kernel.VersionCode(6, 5, 0) // Kernel6_6 is the KernelVersion representation of kernel version 6.6 Kernel6_6 = kernel.VersionCode(6, 6, 0) // Kernel6_10 is the KernelVersion representation of kernel version 6.10 Kernel6_10 = kernel.VersionCode(6, 10, 0) // Kernel6_11 is the KernelVersion representation of kernel version 6.11 Kernel6_11 = kernel.VersionCode(6, 11, 0) )
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version struct { OsRelease map[string]string OsReleasePath string Code kernel.Version UnameRelease string }
Version defines a kernel version helper
func NewKernelVersion ¶
NewKernelVersion returns a new kernel version helper
func (*Version) HaveFentryNoDuplicatedWeakSymbols ¶
HaveFentryNoDuplicatedWeakSymbols returns whether the kernel supports fentry probes with struct arguments
func (*Version) HaveFentrySupport ¶
HaveFentrySupport returns whether the kernel supports fentry probes
func (*Version) HaveFentrySupportWithStructArgs ¶
HaveFentrySupportWithStructArgs returns whether the kernel supports fentry probes with struct arguments
func (*Version) HaveLegacyPipeInodeInfoStruct ¶
HaveLegacyPipeInodeInfoStruct returns whether the kernel uses the legacy pipe_inode_info struct
func (*Version) HaveMmapableMaps ¶
HaveMmapableMaps returns whether the kernel supports mmapable maps.
func (*Version) HavePIDLinkStruct ¶
HavePIDLinkStruct returns whether the kernel uses the pid_link struct, which was removed in 4.19
func (*Version) HaveRingBuffers ¶
HaveRingBuffers returns whether the kernel supports ring buffer.
func (*Version) IsAmazonLinux2022Kernel ¶
IsAmazonLinux2022Kernel returns whether the kernel is an amazon linux 2022 kernel
func (*Version) IsAmazonLinux2023Kernel ¶
IsAmazonLinux2023Kernel returns whether the kernel is an amazon linux 2023 kernel
func (*Version) IsAmazonLinuxKernel ¶
IsAmazonLinuxKernel returns whether the kernel is an amazon linux kernel
func (*Version) IsCOSKernel ¶
IsCOSKernel returns whether the kernel is a suse kernel
func (*Version) IsDebianKernel ¶
IsDebianKernel returns whether the kernel is a debian kernel
func (*Version) IsInRangeCloseOpen ¶
IsInRangeCloseOpen returns whether the kernel version is between the begin version (included) and the end version (excluded)
func (*Version) IsOpenSUSELeap15_3Kernel ¶
IsOpenSUSELeap15_3Kernel returns whether the kernel is an opensuse 15.3 kernel
func (*Version) IsOpenSUSELeapKernel ¶
IsOpenSUSELeapKernel returns whether the kernel is an opensuse kernel
func (*Version) IsOracleUEKKernel ¶
IsOracleUEKKernel returns whether the kernel is an oracle uek kernel
func (*Version) IsRH7Kernel ¶
IsRH7Kernel returns whether the kernel is a rh7 kernel
func (*Version) IsRH8Kernel ¶
IsRH8Kernel returns whether the kernel is a rh8 kernel
func (*Version) IsRH9Kernel ¶
IsRH9Kernel returns whether the kernel is a rh9 kernel
func (*Version) IsRH9_3Kernel ¶
IsRH9_3Kernel returns whether the kernel is a rh9.3 kernel
func (*Version) IsRH9_4Kernel ¶
IsRH9_4Kernel returns whether the kernel is a rh9.3 kernel
func (*Version) IsSLESKernel ¶
IsSLESKernel returns whether the kernel is a sles kernel
func (*Version) IsSuse12Kernel ¶
IsSuse12Kernel returns whether the kernel is a sles 12 kernel
func (*Version) IsSuse15Kernel ¶
IsSuse15Kernel returns whether the kernel is a sles 15 kernel
func (*Version) IsSuseKernel ¶
IsSuseKernel returns whether the kernel is a suse kernel
func (*Version) IsUbuntuKernel ¶
IsUbuntuKernel returns whether the kernel is an ubuntu kernel
func (*Version) SupportBPFSendSignal ¶
SupportBPFSendSignal returns true if the eBPF function bpf_send_signal is available
func (*Version) SupportCORE ¶
SupportCORE returns is CORE is supported
func (*Version) UbuntuKernelVersion ¶
func (k *Version) UbuntuKernelVersion() *kernel.UbuntuKernelVersion
UbuntuKernelVersion returns a parsed ubuntu kernel version or nil if not on ubuntu or if parsing failed