From 14a4d64f476f85cce45f36ece8d7043c28b6b770 Mon Sep 17 00:00:00 2001 From: Nikolay Sivko Date: Sun, 31 Aug 2014 12:50:53 +0400 Subject: [PATCH] fix /proc/pid/statm parsing --- process_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process_linux.go b/process_linux.go index 004d802..dc77edf 100644 --- a/process_linux.go +++ b/process_linux.go @@ -386,8 +386,8 @@ func (p *Process) fillFromStatm() (*MemoryInfoStat, *MemoryInfoExStat, error) { } fields := strings.Split(string(contents), " ") - rss := mustParseUint64(fields[0]) * PageSize - vms := mustParseUint64(fields[1]) * PageSize + vms := mustParseUint64(fields[0]) * PageSize + rss := mustParseUint64(fields[1]) * PageSize memInfo := &MemoryInfoStat{ RSS: rss, VMS: vms,