Documentation
¶
Overview ¶
Package systat 系统状态检测
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Net ¶
type Net struct {
Conns int `json:"conns" yaml:"conns" xml:"conns" cbor:"conns" comment:"connects number"` // 连接数量
Sent uint64 `json:"sent" yaml:"sent" xml:"sent" cbor:"sent" comment:"sent bytes"` // 发送数量,以字节为单位。
Recv uint64 `json:"recv" yaml:"recv" xml:"recv" cbor:"recv" comment:"recv bytes"` // 读取数量,以字节为单位。
}
Net 与网络相关的信息
type OS ¶
type OS struct {
CPU float64 `json:"cpu" yaml:"cpu" xml:"cpu" cbor:"cpu" comment:"cpu usage rate"` // CPU 使用百分比
Mem uint64 `json:"mem" yaml:"mem" xml:"mem" cbor:"mem" comment:"mem usage rate"` // 内存使用量,以 byte 为单位。
Net *Net `json:"net,omitempty" yaml:"net,omitempty" xml:"net,omitempty" cbor:"net,omitempty" comment:"net stats"` // 网络相关数据
}
OS 与系统相关的信息
type Process ¶
type Process struct {
CPU float64 `json:"cpu" yaml:"cpu" xml:"cpu" cbor:"cpu" comment:"cpu usage rate"` // CPU 使用百分比
Mem uint64 `json:"mem" yaml:"mem" xml:"mem" cbor:"mem" comment:"mem usage rate"` // 内存使用量,以 byte 为单位。
Conns int `json:"conns" yaml:"conns" xml:"conns" cbor:"conns" comment:"connects number"` // 连接数量
Goroutines int `` /* 138-byte string literal not displayed */
}
Process 与进程相关的信息
type Stats ¶
type Stats struct {
XMLName struct{} `json:"-" yaml:"-" xml:"stats" cbor:"-"`
OS *OS `json:"os" yaml:"os" xml:"os" cbor:"os" comment:"os stats"` // 系统级别的状态信息
Process *Process `json:"process" yaml:"process" xml:"process" cbor:"process" comment:"process stats"` // 当前进程的状态信息
Created time.Time `json:"created" yaml:"created" xml:"created" cbor:"created" comment:"created time"` // 此条记录的创建时间
}
Stats 监视的状态信息
Click to show internal directories.
Click to hide internal directories.