-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker stats: add blkio rate and blkio IOPS #21026
Conversation
d2bd126
to
817f6df
Compare
@thaJeztah code is rebased again. |
Flaky test on win2lin? https://jenkins.dockerproject.org/job/Docker-PRs-Win2Lin/22938/console
edit: yes, flaky test: #20462 |
if we ever want to support stats on Windows, I don't think we should add more linux specific fields for now. But I'll leave it to other maintainers. |
Maybe at that time we could have a --format flag on stats. Thus we could provide default On 2016/3/11 8:14, David Calavera wrote:
|
IMO, this PR only add a linux specific filed |
I think is fine with a format flag. New fields don't need to be enabled by default. |
blkio rate and IOPS is calculated by introducing PreBlkioStats and PreRead in types.Stats, thus we can get the rate/IOPS by (BlkioStats - PreBlkioStats)/(Read - PreRead) Now with the patch docker stats shows like below: $ docker stats CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BIO(Bytes) BIO(Rate) BIO(IOPS) PIDS 1285939c1fd3 0.07% 796 KB / 64 MB 1.21% 788 B / 648 B 3.568 MB / 512 KB 0 B / 0 B 0.00 / 0.00 0 9c76f7834ae2 0.07% 2.746 MB / 64 MB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B 0 B / 0 B 0.00 / 0.00 0 d1ea048f04e4 0.03% 4.583 MB / 64 MB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B 0 B / 0 B 0.00 / 0.00 0 Signed-off-by: Zhang Yong <[email protected]>
817f6df
to
0ce4cf6
Compare
I'm going to close this PR, we prefer to have a format flag first, and then reconsider adding more columns |
ping @zhangyong-huawei a |
Yeah,I’ll rebase my work on –format flag. Thanks for your kind remind. 发件人: Sebastiaan van Stijn [mailto:[email protected]] ping @zhangyong-huaweihttps://github.com/zhangyong-huawei a --format flag is now added to docker stats; let us know if you want to work on this again (see #24987#24987) — |
replaces #20741
blkio rate and IOPS is calculated by introducing PreBlkioStats and PreRead in
types.Stats, thus we can get the rate/IOPS by (BlkioStats - PreBlkioStats)/(Read - PreRead)
Now with the patch docker stats shows like below:
Signed-off-by: Zhang Yong [email protected]