Documentation
¶
Index ¶
Constants ¶
View Source
const MountHighUsedValue = 90
Variables ¶
This section is empty.
Functions ¶
func SaveAsExcel ¶
Types ¶
type BaseOSInfo ¶
type CPUInfo ¶
type CPUInfo struct {
CPUThreadCount int // cpu线程数
CPUClockSpeed string // cpu主频
CPUModeNum string // CPU版本号
CPULoadAverage string // CPU版本号
}
func NewCPUInfoItem ¶
type DiskInfo ¶
type DiskInfo struct {
RootMountUsedPercent int // 根路径使用率
HighUsedPercentMountPoint string // 90%使用率挂载点
OSDriveLetter string // 系统分区
}
func NewDiskInfoItem ¶
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 OSInfo ¶
type OSInfo struct {
BaseOSInfo
CPUInfo
DiskInfo
MemoryInfo
}
type OSInfoSlice ¶
type OSInfoSlice []OSInfo
func (OSInfoSlice) Len ¶
func (re OSInfoSlice) Len() int
func (OSInfoSlice) Less ¶
func (re OSInfoSlice) Less(i, j int) bool
func (OSInfoSlice) Swap ¶
func (re OSInfoSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.