scanos

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MountHighUsedValue = 90

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseOSInfo

type BaseOSInfo struct {
	Address  string // ip地址
	Hostname string // 主机名
	KernelV  string // 内核版本
	OSV      string // 操作系统版本
}

type CPUInfo

type CPUInfo struct {
	CPUThreadCount int    // cpu线程数
	CPUClockSpeed  string // cpu主频
	CPUModeNum     string // CPU版本号
	CPULoadAverage string // CPU版本号
}

func NewCPUInfoItem

func NewCPUInfoItem(content string) CPUInfo

type DiskInfo

type DiskInfo struct {
	RootMountUsedPercent      int    // 根路径使用率
	HighUsedPercentMountPoint string // 90%使用率挂载点
	OSDriveLetter             string // 系统分区
}

func NewDiskInfoItem

func NewDiskInfoItem(content string) DiskInfo

type DiskInfoMeta

type DiskInfoMeta struct {
	Filesystem   string
	Size         string
	Used         string
	Avail        string
	UsedPercent  string
	MountedPoint string
}

func NewDiskInfoMetaItem

func NewDiskInfoMetaItem(content string) (diskInfoMeta DiskInfoMeta)

数据结构 /dev/vda1 40G 3.4G 34G 9% /

type MemoryInfo

type MemoryInfo struct {
	MemUsed       float64 // 内存使用量
	MemUsePercent float64 // 内存使用占比
	MemTotal      float64 // 内存总量
}

func NewMemInfoItem

func NewMemInfoItem(content string) MemoryInfo

type MetaInfo

type MetaInfo struct {
	BaseOSInfo
	CPUInfo
	DiskInfo
	MemoryInfo
}

type MetaInfoSlice

type MetaInfoSlice []MetaInfo

func (MetaInfoSlice) Len

func (re MetaInfoSlice) Len() int

func (MetaInfoSlice) Less

func (re MetaInfoSlice) Less(i, j int) bool

func (MetaInfoSlice) Swap

func (re MetaInfoSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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