Skip to content

Commit

Permalink
mem_linux: mulitply 1000 to value in order to keep previous unit.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed Jul 3, 2014
1 parent 70d3719 commit 409b0c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mem_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ func VirtualMemory() (*VirtualMemoryStat, error) {

switch key {
case "MemTotal":
ret.Total = mustParseUint64(value)
ret.Total = mustParseUint64(value) * 1000
case "MemFree":
ret.Free = mustParseUint64(value)
ret.Free = mustParseUint64(value) * 1000
case "Buffers":
ret.Buffers = mustParseUint64(value)
ret.Buffers = mustParseUint64(value) * 1000
case "Cached":
ret.Cached = mustParseUint64(value)
ret.Cached = mustParseUint64(value) * 1000
case "Active":
ret.Active = mustParseUint64(value)
ret.Active = mustParseUint64(value) * 1000
case "Inactive":
ret.Inactive = mustParseUint64(value)
ret.Inactive = mustParseUint64(value) * 1000

}
}
Expand Down

0 comments on commit 409b0c7

Please sign in to comment.