diff --git a/command/agent/command.go b/command/agent/command.go index 31595cd93a..eab10c3db9 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -10,6 +10,7 @@ import ( "net" "os" "os/signal" + "runtime" "strings" "syscall" "time" @@ -189,6 +190,11 @@ func (c *Command) Run(args []string) int { } c.args = args + // Check GOMAXPROCS + if runtime.GOMAXPROCS(0) == 1 { + c.Ui.Error("WARNING: It is highly recommended to set GOMAXPROCS higher than 1") + } + // Setup the log outputs logGate, logWriter, logOutput := c.setupLoggers(config) if logWriter == nil {