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"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -284,9 +285,10 @@ func (srv *Server) CmdInfo(stdin io.ReadCloser, stdout io.Writer, args ...string
|
||||||
VERSION,
|
VERSION,
|
||||||
imgcount)
|
imgcount)
|
||||||
|
|
||||||
if !rcli.DEBUG_FLAG {
|
if os.Getenv("DEBUG") == "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(stdout, "Go version: %s\n", runtime.Version())
|
||||||
fmt.Fprintln(stdout, "debug mode enabled")
|
fmt.Fprintln(stdout, "debug mode enabled")
|
||||||
fmt.Fprintf(stdout, "fds: %d\ngoroutines: %d\n", getTotalUsedFds(), runtime.NumGoroutine())
|
fmt.Fprintf(stdout, "fds: %d\ngoroutines: %d\n", getTotalUsedFds(), runtime.NumGoroutine())
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue