meminfo: use bytes, fix type conversion bug.

This commit is contained in:
Siavash Safi 2015-06-01 14:08:09 +04:30
parent a10ab2c102
commit c651d7ccd9

View file

@ -91,7 +91,7 @@ func (c *meminfoCollector) Update(ch chan<- prometheus.Metric) (err error) {
})
}
// Convert metrics to kB ( same as Linux meminfo)
c.metrics[k].Set(float64(v * size / 1024))
c.metrics[k].Set(float64(v) * float64(size))
c.metrics[k].Collect(ch)
}
return err