Skip to content

Commit ab5187b

Browse files
authored
Add compact metrics to vmstat (#754)
Signed-off-by: Charles <[email protected]>
1 parent 420c8cc commit ab5187b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sysfs/vmstat_numa.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ type VMStat struct {
8686
NrKernelMiscReclaimable uint64
8787
NrFollPinAcquired uint64
8888
NrFollPinReleased uint64
89+
CompactStall uint64
90+
CompactFail uint64
91+
CompactSuccess uint64
8992
}
9093

9194
func (fs FS) VMStatNUMA() (map[int]VMStat, error) {
@@ -242,6 +245,12 @@ func parseVMStatNUMA(r []byte) (VMStat, error) {
242245
vmStat.NrFollPinAcquired = fv
243246
case "nr_foll_pin_released":
244247
vmStat.NrFollPinReleased = fv
248+
case "compact_stall":
249+
vmStat.CompactStall = fv
250+
case "compact_fail":
251+
vmStat.CompactFail = fv
252+
case "compact_success":
253+
vmStat.CompactSuccess = fv
245254
}
246255

247256
}

0 commit comments

Comments
 (0)