Skip to content

Commit

Permalink
[fix] mem_used_perc returns percentage of used mem
Browse files Browse the repository at this point in the history
Closes #189
  • Loading branch information
mced authored and sparrc committed Sep 14, 2015
1 parent 11126cf commit 6d6158f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion plugins/system/ps/mem/mem_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6d6158f

Please sign in to comment.