# Memory/Filesystem Percentage

**URL:** <https://discuss.elastic.co/t/memory-filesystem-percentage/144957>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 17, 2018, 7:42pm UTC](https://discuss.elastic.co/t/memory-filesystem-percentage/144957 "2018-08-17T19:42:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sundar\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sundar_v/32/6928_2.png) [@Sundar\_V](https://discuss.elastic.co/u/Sundar_V)\
**Post date:** [August 17, 2018, 7:42pm UTC](https://discuss.elastic.co/t/memory-filesystem-percentage/144957/1 "2018-08-17T19:42:45Z")

</div>

Hello,

In my case, I'm getting `0.96` memory used percentage, however, it should be `96.24` percentage

```auto
memory.used: 2018578432
memory.used.pct: 0.9624
memory.total: 2097442816

```

Looking into the code, I see in memory.go

```auto
	perc := float64(m.Mem.Used) / float64(m.Mem.Total)
	m.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount)

	actualPerc := float64(m.Mem.ActualUsed) / float64(m.Mem.Total)
	m.ActualUsedPercent = common.Round(actualPerc, common.DefaultDecimalPlacesCount)

```

Same in

```auto
func AddFileSystemUsedPercentage(f *FileSystemStat) {
...
	perc := float64(f.Used) / float64(f.Used+f.Avail)
	f.UsedPercent = common.Round(perc, common.DefaultDecimalP)lacesCount
}

```

Shouldn't percentage be multiplied by `100.0`. Is this an issue or am I missing something.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 20, 2018, 12:18pm UTC](https://discuss.elastic.co/t/memory-filesystem-percentage/144957/2 "2018-08-20T12:18:47Z")

</div>

We store `.pct` values as you described above and let Kibana convert it to values from 0-100 in the visualisation. If you need it to be between 0 and 100 you need to multiply it by 100.

Additional note: Not for memory but in the CPU case pct can be \> 1 (100) as there are mutliple CPU's.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 17, 2018, 12:18pm UTC](https://discuss.elastic.co/t/memory-filesystem-percentage/144957/3 "2018-09-17T12:18:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
