psutil

package
v2.149.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(cont *content.Content) http.HandlerFunc

NewHandler for debug.

func Register

func Register(name env.Name, cont *content.Content, mux *http.ServeMux)

Register for debug.

Types

type CPU

type CPU struct {
	Info  []cpu.InfoStat  `yaml:"info,omitempty" json:"info,omitempty" toml:"info,omitempty"`
	Times []cpu.TimesStat `yaml:"times,omitempty" json:"times,omitempty" toml:"times,omitempty"`
}

CPU for debug.

func NewCPU

func NewCPU(ctx context.Context) *CPU

NewCPU for debug.

type Host

type Host struct {
	Info *host.InfoStat `yaml:"info,omitempty" json:"info,omitempty" toml:"info,omitempty"`
}

Host for debug.

func NewHost

func NewHost(ctx context.Context) *Host

NewHost for debug.

type Load

type Load struct {
	Avg *load.AvgStat `yaml:"avg,omitempty" json:"avg,omitempty" toml:"avg,omitempty"`
}

Load for debug.

func NewLoad

func NewLoad(ctx context.Context) *Load

NewLoad for debug.

type Mem

type Mem struct {
	Swap    *mem.SwapMemoryStat    `yaml:"swap,omitempty" json:"swap,omitempty" toml:"swap,omitempty"`
	Virtual *mem.VirtualMemoryStat `yaml:"virtual,omitempty" json:"virtual,omitempty" toml:"virtual,omitempty"`
	Devices []*mem.SwapDevice      `yaml:"devices,omitempty" json:"devices,omitempty" toml:"devices,omitempty"`
}

Mem for debug.

func NewMem

func NewMem(ctx context.Context) *Mem

NewMem for debug.

type Net

type Net struct {
	Counters []net.IOCountersStat `yaml:"counters,omitempty" json:"counters,omitempty" toml:"counters,omitempty"`
}

Net for debug.

func NewNet

func NewNet(ctx context.Context) *Net

NewNet for debug.

type Response

type Response struct {
	CPU  *CPU  `yaml:"cpu,omitempty" json:"cpu,omitempty" toml:"cpu,omitempty"`
	Host *Host `yaml:"host,omitempty" json:"host,omitempty" toml:"host,omitempty"`
	Load *Load `yaml:"load,omitempty" json:"load,omitempty" toml:"load,omitempty"`
	Mem  *Mem  `yaml:"mem,omitempty" json:"mem,omitempty" toml:"mem,omitempty"`
	Net  *Net  `yaml:"net,omitempty" json:"net,omitempty" toml:"net,omitempty"`
}

Response for debug.

Jump to

Keyboard shortcuts

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