Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var M = newMachineInfo()
Functions ¶
func GetDiskInfo ¶
默认路径为:/(win10下如果硬盘分区,则为所在硬盘的根目录) 字段名 含义 disk_used 硬盘已使用 disk_free 硬盘可用 disk_total 硬盘总大小 disk_used_percent 硬盘使用率(三位小数)
func GetMemInfo ¶
字段名 含义 mem_free 内存可用 mem_total 内存总大小 mem_used_percent 内存使用率(三位小数)
Types ¶
type CpuMonitor ¶
type CpuMonitor struct { chain.BaseHandler sync.RWMutex // 保证percent的并发安全 // contains filtered or unexported fields }
func NewCpuMonitor ¶
func NewCpuMonitor() *CpuMonitor
func (*CpuMonitor) MonitorUsePercent ¶
func (c *CpuMonitor) MonitorUsePercent()
type DiskMonitor ¶
type DiskMonitor struct {
chain.BaseHandler
}
func NewDiskMonitor ¶
func NewDiskMonitor() *DiskMonitor
type GetMachineFunc ¶
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
func NewMachine ¶
func NewMachine() *Machine
type MemMonitor ¶
type MemMonitor struct {
chain.BaseHandler
}
func NewMemMonitor ¶
func NewMemMonitor() *MemMonitor
Click to show internal directories.
Click to hide internal directories.