Add exec_boot_time for freebsd, dragonfly

Adds new sysctl type, bsdSysctlTypeStructTimeval to enable parsing of
timevals from raw memory.
This commit is contained in:
Derek Marcotte 2017-04-11 06:04:14 -04:00
commit db8ec9c6b4
3 changed files with 61 additions and 7 deletions

View file

@ -29,8 +29,8 @@ func (c *meminfoCollector) getMemInfo() (map[string]float64, error) {
if err != nil {
return nil, fmt.Errorf("sysctl(vm.stats.vm.v_page_size) failed: %s", err)
}
size := uint64(tmp32)
fromPage := func(v uint64) uint64 {
size := float64(tmp32)
fromPage := func(v float64) float64 {
return v * size
}