MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / GetKernelVersion

Method GetKernelVersion

agent-source-code/internal/system/system.go:318–329  ·  view source on GitHub ↗

GetKernelVersion gets the kernel version

()

Source from the content-addressed store, hash-verified

316
317// GetKernelVersion gets the kernel version
318func (d *Detector) GetKernelVersion() string {
319 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
320 defer cancel()
321
322 info, err := host.InfoWithContext(ctx)
323 if err != nil {
324 d.logger.WithError(err).Warn("Failed to get kernel version")
325 return constants.ErrUnknownValue
326 }
327
328 return info.KernelVersion
329}
330
331// getSELinuxStatus gets SELinux status using file reading
332func (d *Detector) getSELinuxStatus() string {

Callers 2

GetSystemInfoMethod · 0.95
showDiagnosticsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected