Skip to content
Snippets Groups Projects
Commit ca050b59 authored by Brian Brazil's avatar Brian Brazil
Browse files

Merge pull request #204 from pborzenkov/centos6-meminfo-numa-fix

meminfo_numa: fix crash on CentOS 6 kernel
parents 3a96e688 5a085dca
No related branches found
No related tags found
No related merge requests found
Node 0 MemTotal: 134182340 kB
Node 0 MemFree: 53030372 kB
Node 0 MemUsed: 81151968 kB
Loading
Loading
Node 1 MemTotal: 134217728 kB
Node 1 MemFree: 39634788 kB
Node 1 MemUsed: 94582940 kB
Loading
Loading
Loading
Loading
@@ -106,7 +106,10 @@ func parseMemInfoNuma(r io.Reader) (map[meminfoKey]float64, error) {
)
 
for scanner.Scan() {
line := scanner.Text()
line := strings.TrimSpace(scanner.Text())
if line == "" {
continue
}
parts := strings.Fields(string(line))
 
fv, err := strconv.ParseFloat(parts[3], 64)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment