Add more cgroup config to docker info
| ... | ... |
@@ -83,6 +83,21 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
| 83 | 83 |
if !info.SwapLimit {
|
| 84 | 84 |
fmt.Fprintf(cli.err, "WARNING: No swap limit support\n") |
| 85 | 85 |
} |
| 86 |
+ if !info.OomKillDisable {
|
|
| 87 |
+ fmt.Fprintf(cli.err, "WARNING: No oom kill disable support\n") |
|
| 88 |
+ } |
|
| 89 |
+ if !info.CPUCfsQuota {
|
|
| 90 |
+ fmt.Fprintf(cli.err, "WARNING: No cpu cfs quota support\n") |
|
| 91 |
+ } |
|
| 92 |
+ if !info.CPUCfsPeriod {
|
|
| 93 |
+ fmt.Fprintf(cli.err, "WARNING: No cpu cfs period support\n") |
|
| 94 |
+ } |
|
| 95 |
+ if !info.CPUShares {
|
|
| 96 |
+ fmt.Fprintf(cli.err, "WARNING: No cpu shares support\n") |
|
| 97 |
+ } |
|
| 98 |
+ if !info.CPUSet {
|
|
| 99 |
+ fmt.Fprintf(cli.err, "WARNING: No cpuset support\n") |
|
| 100 |
+ } |
|
| 86 | 101 |
if !info.IPv4Forwarding {
|
| 87 | 102 |
fmt.Fprintf(cli.err, "WARNING: IPv4 forwarding is disabled\n") |
| 88 | 103 |
} |
| ... | ... |
@@ -192,6 +192,8 @@ type Info struct {
|
| 192 | 192 |
SwapLimit bool |
| 193 | 193 |
CPUCfsPeriod bool `json:"CpuCfsPeriod"` |
| 194 | 194 |
CPUCfsQuota bool `json:"CpuCfsQuota"` |
| 195 |
+ CPUShares bool |
|
| 196 |
+ CPUSet bool |
|
| 195 | 197 |
IPv4Forwarding bool |
| 196 | 198 |
BridgeNfIptables bool |
| 197 | 199 |
BridgeNfIP6tables bool `json:"BridgeNfIp6tables"` |
| ... | ... |
@@ -101,6 +101,8 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
| 101 | 101 |
v.OomKillDisable = sysInfo.OomKillDisable |
| 102 | 102 |
v.CPUCfsPeriod = sysInfo.CPUCfsPeriod |
| 103 | 103 |
v.CPUCfsQuota = sysInfo.CPUCfsQuota |
| 104 |
+ v.CPUShares = sysInfo.CPUShares |
|
| 105 |
+ v.CPUSet = sysInfo.Cpuset |
|
| 104 | 106 |
} |
| 105 | 107 |
|
| 106 | 108 |
if hostname, err := os.Hostname(); err == nil {
|
| ... | ... |
@@ -113,7 +113,7 @@ list of DNS options to be used in the container. |
| 113 | 113 |
* `POST /build` now optionally takes a serialized map of build-time variables. |
| 114 | 114 |
* `GET /events` now includes a `timenano` field, in addition to the existing `time` field. |
| 115 | 115 |
* `GET /events` now supports filtering by image and container labels. |
| 116 |
-* `GET /info` now lists engine version information. |
|
| 116 |
+* `GET /info` now lists engine version information and return the information of `CPUShares` and `Cpuset`. |
|
| 117 | 117 |
* `GET /containers/json` will return `ImageID` of the image used by container. |
| 118 | 118 |
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused. |
| 119 | 119 |
* `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields. |