sysctl

package
v0.0.0-...-a3816f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sysctl is used to process and analyze sysctl data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot struct {
	// Proc contains the /proc system control parameters and their values
	Proc map[string]interface{} `json:"proc,omitempty"`
	// Sys contains the /sys system control parameters and their values
	Sys map[string]interface{} `json:"sys,omitempty"`
}

Snapshot defines an internal core dump

func NewSnapshot

func NewSnapshot() Snapshot

NewSnapshot returns a new sysctl snapshot

func (*Snapshot) InsertSnapshotEntry

func (s *Snapshot) InsertSnapshotEntry(data map[string]interface{}, file string, value string)

InsertSnapshotEntry inserts the provided file and its value in the input data

func (*Snapshot) Snapshot

func (s *Snapshot) Snapshot(ignoredBaseNames []string) error

Snapshot runs the snapshot by going through the filesystem

func (*Snapshot) ToJSON

func (s *Snapshot) ToJSON() ([]byte, error)

ToJSON serializes the current Snapshot object to JSON

type SnapshotEvent

type SnapshotEvent struct {
	Sysctl Snapshot `json:"sysctl"`
}

SnapshotEvent is a wrapper used for serialization

func NewSnapshotEvent

func NewSnapshotEvent(ignoredBaseNames []string) (*SnapshotEvent, error)

NewSnapshotEvent returns a new sysctl snapshot event

func (*SnapshotEvent) ToJSON

func (s *SnapshotEvent) ToJSON() ([]byte, error)

ToJSON serializes the current SnapshotEvent object to JSON

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL