Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Proposal: Enhance docker info UI to show running and stopped containers #1140

Closed
abronan opened this issue Aug 10, 2015 · 11 comments
Closed

Comments

@abronan
Copy link
Contributor

abronan commented Aug 10, 2015

I have a long running swarm that I use mostly for testing, sometimes I just stress test running containers while shutting down Agents and Managers.

The output of docker info in this case is:

Containers: 1362
Images: 11
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 3
swarm-agent-0: 192.168.42.100:2376
└ Containers: 516
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=dev, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-east, storage=hdd, storagedriver=aufs
swarm-agent-1: 192.168.42.101:2376
└ Containers: 423
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=dev, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-east, storage=ssd, storagedriver=aufs
swarm-agent-2: 192.168.42.102:2376
└ Containers: 423
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=prod, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-west, storage=ssd, storagedriver=aufs
CPUs: 3
Total Memory: 3.058 GiB
Name: swarm-manager-0

From the output, we could think that I have 1362 running containers even though I only have 10. I don't think it makes much sense to show Stopped containers on docker info as it does not help at assessing what is the overall resource utilization of the cluster. Especially for users with tons of short-lived batch jobs. I don't know what would be the best UI for this but I'd expect docker info to show more useful informations such as:

Containers [Running]: 10, [Stopped/Exited]: 1352
Images: 11
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 3
swarm-agent-0: 192.168.42.100:2376
└ Containers: 516
    └ Running : 4
    └ Stopped/Exited : 512
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=dev, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-east, storage=hdd, storagedriver=aufs
swarm-agent-1: 192.168.42.101:2376
└ Containers: 423
    └ Running : 3
    └ Stopped/Exited : 420
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=dev, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-east, storage=ssd, storagedriver=aufs
swarm-agent-2: 192.168.42.102:2376
└ Containers: 423
    └ Running : 3
    └ Stopped/Exited : 420
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.019 GiB
└ Labels: env=prod, executiondriver=native-0.2, kernelversion=3.13.0-55-generic, operatingsystem=Ubuntu 14.04.2 LTS, region=us-west, storage=ssd, storagedriver=aufs
CPUs: 3
Total Memory: 3.058 GiB
Name: swarm-manager-0

WDYT?

@vieux @aluzzardi @jimmyxian @chanwit

@jimmyxian
Copy link
Contributor

👍 pretty good. It's OK to show it in docker info

@chanwit
Copy link
Contributor

chanwit commented Aug 11, 2015

@abronan this is great!
Maybe tweaking a bit of the format would be easier to map this into JSON in long term.

Containers:
└ Running: 10
└ Stopped/Exited: 1362
Images: 11
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 3
swarm-agent-0: 192.168.42.100:2376
└ Containers: 516
    └ Running : 4

@Pensu
Copy link
Contributor

Pensu commented Aug 11, 2015

+1. Sounds great. May be, we can have a more tabular form of output, that can go easier on eyes. I mean, like in OpenStack, each row can contain a node of the cluster, and the information can be given in columns.

Any thoughts?

@abronan
Copy link
Contributor Author

abronan commented Aug 11, 2015

@chanwit better 👍

@Pensu I guess that using columns will be harder to parse maybe? (for our integration tests for example)

@vieux
Copy link
Contributor

vieux commented Aug 11, 2015

I like the idea, but can I suggest what we try to make this change in the engine itself ? I think it would be valuable even in single mode.

@abronan can you open an issue/proposal in the engine ?

@abronan
Copy link
Contributor Author

abronan commented Aug 11, 2015

@vieux Yeah I guess it could make sense even on a single docker daemon, having the information exposed through the remote API directly through info.

@Pensu
Copy link
Contributor

Pensu commented Aug 12, 2015

@abronan I was just talking about presentation. Parsing we can do in json format only. The thing is when you are listing 60-70 nodes, it kinds of become a lot of information to go through. Anyways, just a food for thought. :)

@chanwit
Copy link
Contributor

chanwit commented Aug 13, 2015

@vieux @abronan +1 for adding this to the engine.

@vieux
Copy link
Contributor

vieux commented Sep 9, 2015

@abronan did you open an issue on the engine ?

@abronan
Copy link
Contributor Author

abronan commented Sep 9, 2015

@vieux Yes the proposal on the Engine side is on moby/moby#15639. Needs your input :)

@abronan
Copy link
Contributor Author

abronan commented Jul 1, 2016

This has been solved long ago.

@abronan abronan closed this as completed Jul 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants