mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
+ Runtime: Add go version to debug infos
This commit is contained in:
parent
3484781a6f
commit
d6c24092eb
1 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
@ -284,9 +285,10 @@ func (srv *Server) CmdInfo(stdin io.ReadCloser, stdout io.Writer, args ...string
|
|||
VERSION,
|
||||
imgcount)
|
||||
|
||||
if !rcli.DEBUG_FLAG {
|
||||
if os.Getenv("DEBUG") == "" {
|
||||
return nil
|
||||
}
|
||||
fmt.Fprintf(stdout, "Go version: %s\n", runtime.Version())
|
||||
fmt.Fprintln(stdout, "debug mode enabled")
|
||||
fmt.Fprintf(stdout, "fds: %d\ngoroutines: %d\n", getTotalUsedFds(), runtime.NumGoroutine())
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue