agent: Adding a check for GOMAXPROCS. Fixes #10.

This commit is contained in:
Armon Dadgar 2014-02-22 17:43:12 -08:00
parent 85091090c6
commit 6898f23d2d
1 changed files with 6 additions and 0 deletions

View File

@ -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 {