1 Star 0 Fork 0

sqos/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
diskstat.go 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
// +build darwin freebsd linux windows
package diskio
import (
"github.com/shirou/gopsutil/disk"
sigar "github.com/elastic/gosigar"
)
// mapping fields which output by `iostat -x` on linux
//
// Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await r_await w_await svctm %util
// sda 0.06 0.78 0.09 0.27 9.42 8.06 48.64 0.00 1.34 0.99 1.45 0.77 0.03
type DiskIOMetric struct {
ReadRequestMergeCountPerSec float64 `json:"rrqmCps"`
WriteRequestMergeCountPerSec float64 `json:"wrqmCps"`
ReadRequestCountPerSec float64 `json:"rrqCps"`
WriteRequestCountPerSec float64 `json:"wrqCps"`
// using bytes instead of sector
ReadBytesPerSec float64 `json:"rBps"`
WriteBytesPerSec float64 `json:"wBps"`
AvgRequestSize float64 `json:"avgrqSz"`
AvgQueueSize float64 `json:"avgquSz"`
AvgAwaitTime float64 `json:"await"`
AvgServiceTime float64 `json:"svctm"`
BusyPct float64 `json:"busy"`
}
type DiskIOStat struct {
lastDiskIOCounters map[string]disk.IOCountersStat
lastCpu sigar.Cpu
curCpu sigar.Cpu
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v6.1.4

搜索帮助