本文最后更新于:2023年12月5日 晚上
https://pkg.go.dev/github.com/shirou/gopsutil
参考:Go 每日一库之 gopsutil - 大俊的博客 (darjun.github.io)
mem
数据来自 /proc/meminfo
type SwapDevice
func SwapDevices() ([]*SwapDevice, error)
func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error)
func (m SwapDevice) String() string
type SwapMemoryStat
func SwapMemory() (*SwapMemoryStat, error)
type VirtualMemoryExStat
type VirtualMemoryStat