psutil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudInstanceId

func CloudInstanceId() string

func InterfaceAddrs

func InterfaceAddrs(name string) ([]string, []string)

func PublicAddress

func PublicAddress(force bool) (string, string)

Types

type DetailStat

type DetailStat struct {
	*SummaryStat
	CpuModel      []string
	NetInterface  []NetInterface
	NetBytesRecv  uint64
	NetBytesSent  uint64
	DiskPartition []DiskPartition
	DiskTotal     uint64
	DiskUsed      uint64
	SwapTotal     uint64
	SwapUsed      uint64
}

func Detail

func Detail(withAddr bool) *DetailStat

type DiskPartition

type DiskPartition struct {
	Device     string
	Mountpoint string
	Fstype     string
	Total      uint64
	Used       uint64
}

type NetInterface

type NetInterface struct {
	Name      string
	BytesRecv uint64
	BytesSent uint64
	Dropin    uint64
	Dropout   uint64
	Ipv4List  []string
	Ipv6List  []string
}

type SummaryStat

type SummaryStat struct {
	CreateAt     int64
	HostId       string
	HostName     string
	Uptime       uint64
	OS           string
	Platform     string
	KernelArch   string
	CpuCore      int
	CpuCoreLogic int
	CpuPercent   []float64
	MemoryTotal  uint64
	MemoryUsed   uint64
	PublicIpv4   string
	PublicIpv6   string
}

func Summary

func Summary(withAddr bool) *SummaryStat

func (*SummaryStat) From

func (p *SummaryStat) From(s string)

func (*SummaryStat) String

func (p *SummaryStat) String() string

Jump to

Keyboard shortcuts

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