psutil

package
v1.2.47 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllAddr added in v1.2.30

func AllAddr(addr net.Addr) bool

func BroadcastInterface

func BroadcastInterface(intf net.Interface) bool

func HostIP

func HostIP(intfFilter InterfaceFilter, addrFilter AddrFilter) []string

func HostIPv4

func HostIPv4() []string

func HostIPv6

func HostIPv6() []string

func HostMAC

func HostMAC() []string

func LoopbackInterface

func LoopbackInterface(intf net.Interface) bool

func Marshal

func Marshal() []byte

func MarshalIndent

func MarshalIndent() []byte

func MarshalIndentString added in v1.2.44

func MarshalIndentString() string

func MulticastInterface

func MulticastInterface(intf net.Interface) bool

func PointToPointInterface

func PointToPointInterface(intf net.Interface) bool

func RunningInterface

func RunningInterface(intf net.Interface) bool

func UpInterface

func UpInterface(intf net.Interface) bool

Types

type AddrFilter

type AddrFilter func(net.Addr) bool

type CPUByModel added in v1.2.44

type CPUByModel struct {
	Cores         int32
	CacheSizeByte int32
	CacheSize     string
	Frequency     string
	Flags         []string
	InfoStat      []pscpu.InfoStat `json:"cpu_raw_info_stat"`
}

type CPUV2 added in v1.2.44

type CPUV2 struct {
	ModelCount int
	CPUModel   map[string]CPUByModel
}

type DiskUsageInfo added in v1.2.44

type DiskUsageInfo struct {
	Path  string
	Total string
	Free  string
	Used  string
}

type DiskV2 added in v1.2.44

type DiskV2 struct {
	DiskUsageInfo []DiskUsageInfo
	Usages        []*psdisk.UsageStat `json:"disk_raw_usage"`
}

type GPUV2 added in v1.2.44

type GPUV2 struct {
	GPU *sysGPU `json:",inline"`
}

type InterfaceFilter

type InterfaceFilter func(net.Interface) bool

type MemV2 added in v1.2.44

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

type NetV2 added in v1.2.44

type NetV2 struct {
	IPv4 []string
	IPv6 []string
}

type SysHard added in v1.2.44

type SysHard struct {
	OS     string
	Arch   string
	CPU    CPUV2
	Memory MemV2
	Disk   DiskV2
	GPU    GPUV2
	Net    NetV2
}

func GetSysHardV2 added in v1.2.44

func GetSysHardV2() SysHard

Jump to

Keyboard shortcuts

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