fix(agent): measure first disk I/O sample of an interval from the full baseline (#2420)

This commit is contained in:
Ludwig J. Marx
2026-09-25 19:38:04 +02:00
committed by GitHub
parent 3dfe062ee4
commit 433b83800f
3 changed files with 65 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ type Agent struct {
fsNames []string // List of filesystem device names being monitored
fsStats map[string]*system.FsStats // Keeps track of disk stats for each filesystem
diskPrev map[uint16]map[string]prevDisk // Previous disk I/O counters per cache interval
diskBaseline map[string]prevDisk // Latest disk I/O counters of any interval, seeds a new interval
diskUsageCacheDuration time.Duration // How long to cache disk usage (to avoid waking sleeping disks)
lastDiskUsageUpdate time.Time // Last time disk usage was collected
netInterfaces map[string]struct{} // Stores all valid network interfaces