diff --git a/api/client/info.go b/api/client/info.go index 22b7ebb806cc6389bc7c5ed9af42beb14d1e92c8..eba6a31992d09ecec1d2392ca4f307c3bc60cb1a 100644 --- a/api/client/info.go +++ b/api/client/info.go @@ -83,6 +83,21 @@ func (cli *DockerCli) CmdInfo(args ...string) error { if !info.SwapLimit { fmt.Fprintf(cli.err, "WARNING: No swap limit support\n") } + if !info.OomKillDisable { + fmt.Fprintf(cli.err, "WARNING: No oom kill disable support\n") + } + if !info.CPUCfsQuota { + fmt.Fprintf(cli.err, "WARNING: No cpu cfs quota support\n") + } + if !info.CPUCfsPeriod { + fmt.Fprintf(cli.err, "WARNING: No cpu cfs period support\n") + } + if !info.CPUShares { + fmt.Fprintf(cli.err, "WARNING: No cpu shares support\n") + } + if !info.CPUSet { + fmt.Fprintf(cli.err, "WARNING: No cpuset support\n") + } if !info.IPv4Forwarding { fmt.Fprintf(cli.err, "WARNING: IPv4 forwarding is disabled\n") } diff --git a/api/types/types.go b/api/types/types.go index 764878665cf6c33667544a8dd5c32d4644d212e8..5caf63eea3f625f8e462102daaf87aa770d7703f 100644 --- a/api/types/types.go +++ b/api/types/types.go @@ -190,6 +190,8 @@ type Info struct { SwapLimit bool CPUCfsPeriod bool `json:"CpuCfsPeriod"` CPUCfsQuota bool `json:"CpuCfsQuota"` + CPUShares bool + CPUSet bool IPv4Forwarding bool BridgeNfIptables bool BridgeNfIP6tables bool `json:"BridgeNfIp6tables"` diff --git a/daemon/info.go b/daemon/info.go index 64ff11ca51a72a7b6bccf5c348da05fd55cb2020..66ead0726dc4ff2704687786548b051e05cba757 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -104,6 +104,8 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) { v.OomKillDisable = sysInfo.OomKillDisable v.CPUCfsPeriod = sysInfo.CPUCfsPeriod v.CPUCfsQuota = sysInfo.CPUCfsQuota + v.CPUShares = sysInfo.CPUShares + v.CPUSet = sysInfo.Cpuset } if httpProxy := os.Getenv("http_proxy"); httpProxy != "" { diff --git a/docs/reference/api/docker_remote_api.md b/docs/reference/api/docker_remote_api.md index e7888bcb99537d1abd0d5d480a4e46b55aa5b818..fe222835d9d0ee5368e1f6a0b868ef94c019e9e7 100644 --- a/docs/reference/api/docker_remote_api.md +++ b/docs/reference/api/docker_remote_api.md @@ -89,7 +89,7 @@ list of DNS options to be used in the container. * `POST /build` now optionally takes a serialized map of build-time variables. * `GET /events` now includes a `timenano` field, in addition to the existing `time` field. * `GET /events` now supports filtering by image and container labels. -* `GET /info` now lists engine version information. +* `GET /info` now lists engine version information and return the information of `CPUShares` and `Cpuset`. * `GET /containers/json` will return `ImageID` of the image used by container. * `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.