{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18808","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/18808/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18808/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18808/events","html_url":"https://github.com/docker/docker/pull/18808","id":123157270,"number":18808,"title":"Display total consumption for stats","user":{"login":"WeiZhang555","id":1203611,"avatar_url":"https://avatars.githubusercontent.com/u/1203611?v=3","gravatar_id":"","url":"https://api.github.com/users/WeiZhang555","html_url":"https://github.com/WeiZhang555","followers_url":"https://api.github.com/users/WeiZhang555/followers","following_url":"https://api.github.com/users/WeiZhang555/following{/other_user}","gists_url":"https://api.github.com/users/WeiZhang555/gists{/gist_id}","starred_url":"https://api.github.com/users/WeiZhang555/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeiZhang555/subscriptions","organizations_url":"https://api.github.com/users/WeiZhang555/orgs","repos_url":"https://api.github.com/users/WeiZhang555/repos","events_url":"https://api.github.com/users/WeiZhang555/events{/privacy}","received_events_url":"https://api.github.com/users/WeiZhang555/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-12-20T12:25:25Z","updated_at":"2016-02-18T19:24:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/18808","html_url":"https://github.com/docker/docker/pull/18808","diff_url":"https://github.com/docker/docker/pull/18808.diff","patch_url":"https://github.com/docker/docker/pull/18808.patch"},"body":"Fixes #18733 \r\n\r\nDisplay total resource consumption of all containers in `stats` result.\r\n\r\nAdd flag `-t` to enable or disable total's display, default is 'true'. I'm thinking how about make total's display a predefined behavior and remove flag(which means display total value always)?\r\n\r\n`docker stats` result with this change:\r\n```\r\n$ docker stats --no-stream\r\nCONTAINER           CPU %               MEM USAGE / LIMIT   MEM %               NET I/O             BLOCK I/O\r\n101fb7f50a5c        0.00%               104.8 MB / 3.7 GB   2.83%               4.812 kB / 648 B    79.97 MB / 8.192 kB\r\n344851d0e3f4        0.00%               3.043 MB / 3.7 GB   0.08%               12.1 kB / 648 B     2.728 MB / 0 B\r\n------------\r\nTotals              0.00%               107.8 MB / 0 B      2.91%               16.91 kB / 1.296 kB   82.7 MB / 8.192 kB\r\n```\r\n\r\nI'm not sure how to calculate total memory limit, so just leave it to zero which means it has no representative meanings.\r\n\r\nSigned-off-by: Zhang Wei <zhangwei555@huawei.com>"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/185875528","html_url":"https://github.com/docker/docker/pull/18808#issuecomment-185875528","issue_url":"https://api.github.com/repos/docker/docker/issues/18808","id":185875528,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T19:24:37Z","updated_at":"2016-02-18T19:24:37Z","body":"Ok, we just reviewed this and we're okay with this, but can you remove the `-t` shorthand, and only use `--total`?"}}