Hello,
In my case, I'm getting 0.96
memory used percentage, however, it should be 96.24
percentage
memory.used: 2018578432
memory.used.pct: 0.9624
memory.total: 2097442816
Looking into the code, I see in memory.go
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
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.