monitor

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatStats

func FormatStats(stats *NodeStats, runtime *RuntimeStatus, procs []Process) string

func RunCommand

func RunCommand(client *goss.Client, cmd string) (string, string, error)

func RunInteractive

func RunInteractive(client *goss.Client, cmd string) error

Types

type NodeStats

type NodeStats struct {
	Hostname string
	Kernel   string
	Uptime   string
	CPU      string
	Memory   string
	Disk     string
	NetIn    string
	NetOut   string
	CPUCores int
	CPULoad  string
	MemUsed  string
	MemTotal string
	DiskUsed string
	DiskSize string
}

func GetStats

func GetStats(client *goss.Client) (*NodeStats, error)

type Process

type Process struct {
	PID  int
	CPU  float64
	MEM  float64
	Cmd  string
	User string
}

func GetTopProcesses

func GetTopProcesses(client *goss.Client, count int) ([]Process, error)

type RuntimeStatus

type RuntimeStatus struct {
	K3sVersion string
	K3sRunning string
	DockerVer  string
	DockerOK   string
	PodCount   string
}

func GetRuntimeStatus

func GetRuntimeStatus(client *goss.Client) *RuntimeStatus

Jump to

Keyboard shortcuts

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