Merge pull request #1498 from chouquette/fix_linux_mem_metrics

mem: linux: fix vmstat field names
pull/1499/head
shirou 2 years ago committed by GitHub
commit cbd528875a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -371,25 +371,25 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
continue
}
ret.Sout = value * 4 * 1024
case "pgpgIn":
case "pgpgin":
value, err := strconv.ParseUint(fields[1], 10, 64)
if err != nil {
continue
}
ret.PgIn = value * 4 * 1024
case "pgpgOut":
case "pgpgout":
value, err := strconv.ParseUint(fields[1], 10, 64)
if err != nil {
continue
}
ret.PgOut = value * 4 * 1024
case "pgFault":
case "pgfault":
value, err := strconv.ParseUint(fields[1], 10, 64)
if err != nil {
continue
}
ret.PgFault = value * 4 * 1024
case "pgMajFault":
case "pgmajfault":
value, err := strconv.ParseUint(fields[1], 10, 64)
if err != nil {
continue

Loading…
Cancel
Save