1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +00:00

Bump libcompose and sync dependencies

This commit is contained in:
Josh Curl
2016-05-31 22:01:53 -07:00
parent 742c9a9401
commit 7ea6dfbe07
829 changed files with 34 additions and 125457 deletions

View File

@@ -1,25 +0,0 @@
// +build !solaris
package supervisor
import "github.com/cloudfoundry/gosigar"
type Machine struct {
Cpus int
Memory int64
}
func CollectMachineInformation() (Machine, error) {
m := Machine{}
cpu := sigar.CpuList{}
if err := cpu.Get(); err != nil {
return m, err
}
m.Cpus = len(cpu.List)
mem := sigar.Mem{}
if err := mem.Get(); err != nil {
return m, err
}
m.Memory = int64(mem.Total / 1024 / 1024)
return m, nil
}