diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cfaefda5..3519407dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ will still be backwards compatible if only `url` is specified. - [#178](https://github.com/influxdb/telegraf/issues/178): redis plugin, multiple server thread hang bug - Fix net plugin on darwin - [#84](https://github.com/influxdb/telegraf/issues/84): Fix docker plugin on CentOS. Thanks @neezgee! +- [#189](https://github.com/influxdb/telegraf/pull/189): Fix mem_used_perc. Thanks @mced! ## v0.1.8 [2015-09-04] diff --git a/plugins/system/ps/mem/mem_linux.go b/plugins/system/ps/mem/mem_linux.go index 42a49a2b6..b2519ddd5 100644 --- a/plugins/system/ps/mem/mem_linux.go +++ b/plugins/system/ps/mem/mem_linux.go @@ -45,7 +45,7 @@ func VirtualMemory() (*VirtualMemoryStat, error) { } ret.Available = ret.Free + ret.Buffers + ret.Cached ret.Used = ret.Total - ret.Free - ret.UsedPercent = float64(ret.Total-ret.Available) / float64(ret.Total) * 100.0 + ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 return ret, nil }