gops

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUTracker

type CPUTracker struct {
	// contains filtered or unexported fields
}

type DiskRateCursor added in v0.0.5

type DiskRateCursor struct {
	Timestamp time.Time                      `json:"timestamp"`
	IOStats   map[string]disk.IOCountersStat `json:"iostats"`
}

type GopsUtil

type GopsUtil struct{}

func NewGopsUtil

func NewGopsUtil() *GopsUtil

func (*GopsUtil) GetAllMetrics

func (self *GopsUtil) GetAllMetrics(procSortBy ProcSortBy, procLimit int, enableProcessCPU bool) (*models.SystemMetrics, error)

func (*GopsUtil) GetAllMetricsWithCursors

func (self *GopsUtil) GetAllMetricsWithCursors(procSortBy ProcSortBy, procLimit int, enableProcessCPU bool, cpuCursor string, procCursor string) (*models.SystemMetrics, error)

func (*GopsUtil) GetCPUInfo

func (self *GopsUtil) GetCPUInfo() (*models.CPUInfo, error)

func (*GopsUtil) GetCPUInfoWithCursor

func (self *GopsUtil) GetCPUInfoWithCursor(cursor string) (*models.CPUInfo, error)

func (*GopsUtil) GetDiskInfo

func (self *GopsUtil) GetDiskInfo() ([]*models.DiskInfo, error)

func (*GopsUtil) GetDiskMounts

func (self *GopsUtil) GetDiskMounts() ([]*models.DiskMountInfo, error)

func (*GopsUtil) GetDiskRates added in v0.0.5

func (self *GopsUtil) GetDiskRates(cursorStr string) (*models.DiskRateResponse, error)

func (*GopsUtil) GetGPUInfo

func (self *GopsUtil) GetGPUInfo() (*models.GPUInfo, error)

func (*GopsUtil) GetGPUInfoWithTemp

func (self *GopsUtil) GetGPUInfoWithTemp(pciIds []string) (*models.GPUInfo, error)

func (*GopsUtil) GetGPUTemp

func (self *GopsUtil) GetGPUTemp(pciId string) (*models.GPUTempInfo, error)

func (*GopsUtil) GetMemoryInfo

func (self *GopsUtil) GetMemoryInfo() (*models.MemoryInfo, error)

func (*GopsUtil) GetMeta

func (self *GopsUtil) GetMeta(modules []string, params MetaParams) (*models.MetaInfo, error)

func (*GopsUtil) GetModules

func (self *GopsUtil) GetModules() (*models.ModulesInfo, error)

func (*GopsUtil) GetNetworkInfo

func (self *GopsUtil) GetNetworkInfo() ([]*models.NetworkInfo, error)

func (*GopsUtil) GetNetworkRates added in v0.0.5

func (self *GopsUtil) GetNetworkRates(cursorStr string) (*models.NetworkRateResponse, error)

func (*GopsUtil) GetProcesses

func (self *GopsUtil) GetProcesses(sortBy ProcSortBy, limit int, enableCPU bool) (*models.ProcessListResponse, error)

func (*GopsUtil) GetProcessesWithCursor

func (self *GopsUtil) GetProcessesWithCursor(sortBy ProcSortBy, limit int, enableCPU bool, cursor string) (*models.ProcessListResponse, error)

func (*GopsUtil) GetSystemHardware

func (self *GopsUtil) GetSystemHardware() (*models.SystemHardware, error)

func (*GopsUtil) GetSystemInfo

func (self *GopsUtil) GetSystemInfo() (*models.SystemInfo, error)

func (*GopsUtil) GetSystemTemperatures added in v0.0.5

func (self *GopsUtil) GetSystemTemperatures() ([]models.TemperatureSensor, error)

GetSystemTemperatures returns system temperature sensors

type MetaParams

type MetaParams struct {
	SortBy         ProcSortBy
	ProcLimit      int
	EnableCPU      bool
	GPUPciIds      []string
	CPUCursor      string
	ProcCursor     string
	NetRateCursor  string
	DiskRateCursor string
}

type NetworkRateCursor added in v0.0.5

type NetworkRateCursor struct {
	Timestamp time.Time                     `json:"timestamp"`
	IOStats   map[string]net.IOCountersStat `json:"iostats"`
}

type ProcSortBy

type ProcSortBy string
const (
	SortByCPU    ProcSortBy = "cpu"
	SortByMemory ProcSortBy = "memory"
	SortByName   ProcSortBy = "name"
	SortByPID    ProcSortBy = "pid"
)

func (ProcSortBy) Schema

func (u ProcSortBy) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

Jump to

Keyboard shortcuts

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