Skip to content

Commit

Permalink
/info: Add keys Architecture, OSType
Browse files Browse the repository at this point in the history
  - introduces Swarm-relevant keys, see docker#13634
  - docs updated

Signed-off-by: Olle Jonsson <[email protected]>
  • Loading branch information
olleolleolle authored and vdemeester committed Nov 14, 2015
1 parent 31a6e01 commit 4e8fcd4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/client/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
ioutils.FprintfIfNotEmpty(cli.out, "Kernel Version: %s\n", info.KernelVersion)
ioutils.FprintfIfNotEmpty(cli.out, "Operating System: %s\n", info.OperatingSystem)
ioutils.FprintfIfNotEmpty(cli.out, "OSType: %s\n", info.OSType)
ioutils.FprintfIfNotEmpty(cli.out, "Architecture: %s\n", info.Architecture)
fmt.Fprintf(cli.out, "CPUs: %d\n", info.NCPU)
fmt.Fprintf(cli.out, "Total Memory: %s\n", units.BytesSize(float64(info.MemTotal)))
ioutils.FprintfIfNotEmpty(cli.out, "Name: %s\n", info.Name)
Expand Down
2 changes: 2 additions & 0 deletions api/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ type Info struct {
NEventsListener int
KernelVersion string
OperatingSystem string
OSType string
Architecture string
IndexServerAddress string
RegistryConfig *registry.ServiceConfig
InitSha1 string
Expand Down
2 changes: 2 additions & 0 deletions daemon/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
KernelVersion: kernelVersion,
OperatingSystem: operatingSystem,
IndexServerAddress: registry.IndexServer,
OSType: runtime.GOOS,
Architecture: runtime.GOARCH,
RegistryConfig: daemon.RegistryService.Config,
InitSha1: dockerversion.InitSHA1,
InitPath: initPath,
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/api/docker_remote_api_v1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,7 @@ Display system-wide information
Content-Type: application/json

{
"Architecture": "amd64",
"Containers": 11,
"CpuCfsPeriod": true,
"CpuCfsQuota": true,
Expand Down Expand Up @@ -1915,6 +1916,7 @@ Display system-wide information
"Name": "prod-server-42",
"NoProxy": "9.81.1.160",
"OomKillDisable": true,
"OSType": "linux",
"OperatingSystem": "Boot2Docker",
"RegistryConfig": {
"IndexConfigs": {
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/commandline/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ For example:
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.19.0-22-generic
OSType: linux
Architecture: amd64
Operating System: Ubuntu 15.04
CPUs: 24
Total Memory: 62.86 GiB
Expand Down
2 changes: 2 additions & 0 deletions integration-cli/docker_api_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func (s *DockerSuite) TestInfoApi(c *check.C) {
"LoggingDriver",
"OperatingSystem",
"NCPU",
"OSType",
"Architecture",
"MemTotal",
"KernelVersion",
"Driver",
Expand Down
2 changes: 2 additions & 0 deletions integration-cli/docker_cli_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func (s *DockerSuite) TestInfoEnsureSucceeds(c *check.C) {
"Containers:",
"Images:",
"Execution Driver:",
"OSType:",
"Architecture:",
"Logging Driver:",
"Operating System:",
"CPUs:",
Expand Down
2 changes: 2 additions & 0 deletions man/docker-info.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Here is a sample output:
Logging Driver: json-file
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04 LTS
OSType: linux
Architecture: amd64
CPUs: 1
Total Memory: 2 GiB

Expand Down

0 comments on commit 4e8fcd4

Please sign in to comment.