Skip to content

Commit

Permalink
Updated sysctl usage for cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Scheuermann committed Aug 28, 2016
1 parent 4250e53 commit 9844ad9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/bootstrap/docker/dockermachine/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ func determineMachineMemory() int {
// TODO: implement linux & windows
func determineMachineProcessors() int {
if runtime.GOOS == "darwin" {
output, _, err := localcmd.New("sysctl").Args("-n", "hw.ncpus").Output()
output, _, err := localcmd.New("sysctl").Args("-n", "hw.physicalcpu").Output()
if err == nil {
ncpus, aerr := strconv.Atoi(strings.TrimSpace(output))
cpus, aerr := strconv.Atoi(strings.TrimSpace(output))
if aerr == nil {
return ncpus // use all cpus
return cpus // use all cpus
}
}
}
Expand Down

0 comments on commit 9844ad9

Please sign in to comment.