Skip to content

Commit

Permalink
Merge pull request #1498 from chouquette/fix_linux_mem_metrics
Browse files Browse the repository at this point in the history
mem: linux: fix vmstat field names
  • Loading branch information
shirou committed Aug 8, 2023
2 parents 78feb45 + 8181a44 commit cbd5288
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mem/mem_linux.go
Expand Up @@ -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
Expand Down

0 comments on commit cbd5288

Please sign in to comment.