Skip to content

Commit

Permalink
calculate memory.used for linux to keep the backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Oct 24, 2017
1 parent 870626f commit 9061847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/linux/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (g *MemoryGenerator) Generate() (metrics.Values, error) {

ret := map[string]float64{
"memory.total": float64(memory.Total),
"memory.used": float64(memory.Used),
"memory.used": float64(memory.Total - memory.Free - memory.Buffers - memory.Cached),
"memory.available": float64(memory.Available),
"memory.buffers": float64(memory.Buffers),
"memory.cached": float64(memory.Cached),
Expand Down

0 comments on commit 9061847

Please sign in to comment.