Documentation
¶
Overview ¶
Package collector 采集节点系统信息(Linux /proc,零外部依赖)。 生产 Agent 部署在 Linux systemd 环境,无需跨平台。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector 通过 /proc 采集。
type Snapshot ¶
type Snapshot struct {
CPU float64 // 百分比(自上次采集以来的均值)
Mem float64 // 已用内存(字节)
MemTotal float64 // 总内存(字节)
Disk float64 // 已用磁盘(字节)
DiskTotal float64 // 总磁盘(字节)
RxBytes uint64 // 物理网卡接收总字节
TxBytes uint64 // 物理网卡发送总字节
RxRate float64 // 入口带宽速率(字节/秒)
TxRate float64 // 出口带宽速率(字节/秒)
}
Snapshot 一次采集结果。
Click to show internal directories.
Click to hide internal directories.