Title: Network stats is null · Issue #382 · docker-java/docker-java · GitHub
Open Graph Title: Network stats is null · Issue #382 · docker-java/docker-java
X Title: Network stats is null · Issue #382 · docker-java/docker-java
Description: I'm using the StatsCmd to pull stats from a running docker container. All stats are present except for the network statistics. I'm testing against docker version 1.9 (machine/boot2docker) running with docker-java 2.1.2 2015-11-24 11:24:4...
Open Graph Description: I'm using the StatsCmd to pull stats from a running docker container. All stats are present except for the network statistics. I'm testing against docker version 1.9 (machine/boot2docker) running w...
X Description: I'm using the StatsCmd to pull stats from a running docker container. All stats are present except for the network statistics. I'm testing against docker version 1.9 (machine/boot2docker) r...
Opengraph URL: https://github.com/docker-java/docker-java/issues/382
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Network stats is null","articleBody":"I'm using the `StatsCmd` to pull stats from a running docker container. All stats are present except for the network statistics. I'm testing against docker version 1.9 (machine/boot2docker) running with docker-java 2.1.2\n\n```\n2015-11-24 11:24:43,808 DEBUG r.c.v.c.e.docker.DockerExecutor [] []- Received stats #2: com.github.dockerjava.api.model.Statistics@2c1e3fba[read=2015-11-24T10:24:43.802284194Z\n,networkStats=\u003cnull\u003e,memoryStats={usage=14782464, max_usage=14782464, stats={active_anon=0, active_file=14635008, cache=14696448, hierarchical_memory_limit=9223372036854771712, hierarchical_memsw_limit=9223372036854771712, inactive_anon=53248, inactive_file=57344, mapped_file=45056, pgfault=1713, pgmajfault=1, pgpgin=5048, pgpgout=1447, rss=53248, rss_huge=0, swap=0, total_active_anon=0, total_active_file=14635008, total_cache=14696448, total_inactive_anon=53248, total_inactive_file=57344, total_mapped_file=45056, total_pgfault=1713, total_pgmajfault=1, total_pgpgin=5048, total_pgpgout=1447, total_rss=53248, total_rss_huge=0, total_swap=0, total_unevictable=0, total_writeback=0, unevictable=0, writeback=0}, failcnt=0, limit=1044160512},blkioStats={io_service_bytes_recursive=[{major=8, minor=0, op=Read, value=49152}, {major=8, minor=0, op=Write, value=0}, {major=8, minor=0, op=Sync, value=0}, {major=8, minor=0, op=Async, value=49152}, {major=8, minor=0, op=Total, value=49152}], io_serviced_recursive=[{major=8, minor=0, op=Read, value=2}, {major=8, minor=0, op=Write, value=0}, {major=8, minor=0, op=Sync, value=0}, {major=8, minor=0, op=Async, value=2}, {major=8, minor=0, op=Total, value=2}], io_queue_recursive=[], io_service_time_recursive=[], io_wait_time_recursive=[], io_merged_recursive=[], io_time_recursive=[], sectors_recursive=[]},cpuStats={cpu_usage={total_usage=353197358, percpu_usage=[353197358, 0, 0, 0], usage_in_kernelmode=180000000, usage_in_usermode=20000000}, system_cpu_usage=54367350000000, throttling_data={periods=0, throttled_periods=0, throttled_time=0}}]\n```\n\nthe code which produces this is pretty much the one in the tests:\n\n```\n dockerClient.statsCmd().withContainerId(id).exec(statsCallback);\n\n[..]\n\n private class StatsCallback extends ResultCallbackTemplate\u003cStatsCallback, Statistics\u003e {\n\n\n List\u003cStatistics\u003e statisticsList = new LinkedList\u003c\u003e();\n\n @Override\n public void onNext(Statistics stats) {\n LOG.debug(\"Received stats #{}: {}\", statisticsList.size(), stats);\n LOG.debug(\"network {}\", stats.getNetworkStats());\n statisticsList.add(stats);\n }\n\n public List\u003cStatistics\u003e getStatisticsList() {\n return statisticsList;\n }\n }\n\n```\n\nDebug output\n\n```\n\n2015-11-24 11:35:32,799 DEBUG c.g.d.jaxrs.DockerCmdExecFactoryImpl [] []- 2 * Client response received on thread pool-2-thread-1\n2 \u003c 200\n2 \u003c Content-Length: -1\n2 \u003c Content-Type: application/json; charset=utf-8\n2 \u003c Date: Tue, 24 Nov 2015 10:35:32 GMT\n2 \u003c Server: Docker/1.9.0 (linux)\n2 \u003c Transfer-Encoding: chunked\n{\"read\":\"2015-11-24T10:35:32.802091898Z\",\"precpu_stats\":{\"cpu_usage\":{\"total_usage\":0,\"percpu_usage\":null,\"usage_in_kernelmode\":0,\"usage_in_usermode\":0},\"system_cpu_usage\":0,\"throttling_data\":{\"periods\":0,\"throttled_periods\":0,\"throttled_time\":0}},\"cpu_stats\":{\"cpu_usage\":{\"total_usage\":29378848,\"percpu_usage\":[29378848,0,0,0],\"usage_in_kernelmode\":0,\"usage_in_usermode\":20000000},\"system_cpu_usage\":56960550000000,\"throttling_data\":{\"periods\":0,\"throttled_periods\":0,\"throttled_time\":0}},\"memory_stats\":{\"usage\":122880,\"max_usage\":6160384,\"stats\":{\"active_anon\":49152,\"active_file\":16384,\"cache\":53248,\"hierarchical_memory_limit\":9223372036854771712,\"hierarchical_memsw_limit\":9223372036854771712,\"inactive_anon\":0,\"inactive_file\":0,\"mapped_file\":0,\"pgfault\":1764,\"pgmajfault\":0,\"pgpgin\":1499,\"pgpgout\":1474,\"rss\":49152,\"rss_huge\":0,\"swap\":0,\"total_active_anon\":49152,\"total_active_file\":16384,\"total_cache\":53248,\"total_inactive_anon\":0,\"total_inactive_file\":0,\"total_mapped_file\":0,\"total_pgfault\":1764,\"total_pgmajfault\":0,\"total_pgpgin\":1499,\"total_pgpgout\":1474,\"total_rss\":49152,\"total_rss_huge\":0,\"total_swap\":0,\"total_unevictable\":0,\"total_writeback\":0,\"unevictable\":0,\"writeback\":0},\"failcnt\":0,\"limit\":1044160512},\"blkio_stats\":{\"io_service_bytes_recursive\":[],\"io_serviced_recursive\":[],\"io_queue_recursive\":[],\"io_service_time_recursive\":[],\"io_wait_time_recursive\":[],\"io_merged_recursive\":[],\"io_time_recursive\":[],\"sectors_recursive\":[]},\"networks\":{\"eth0\":{\"rx_bytes\":51729,\"rx_packets\":41,\"rx_errors\":0,\"rx_dropped\":0,\"tx_bytes\":2205,\"tx_packets\":36,\"tx_errors\":0,\"tx_dropped\":0}}}\n```\n\nLE: \n\nit seems that the json field name is `networks` (plural) while [Statistics.java](https://github.com/docker-java/docker-java/blob/master/src/main/java/com/github/dockerjava/api/model/Statistics.java) expects `network` ( singular)\n","author":{"url":"https://github.com/cosu","@type":"Person","name":"cosu"},"datePublished":"2015-11-24T10:32:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/382/docker-java/issues/382"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ddcf980e-125c-25b2-56a2-e76d82e66d47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98E0:3DD152:31F1F5C:410A1AE:6974E686 |
| html-safe-nonce | 797ac8a0b2a564130dcdf1cbaae3811ec292c8dd03f28600ffcce6572755961c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEUwOjNERDE1MjozMUYxRjVDOjQxMEExQUU6Njk3NEU2ODYiLCJ2aXNpdG9yX2lkIjoiODY2NTc0NDAzNTAxMzc4MTEyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 636bdf072c7789a210cd4f85bc83a4e3275f058d924886059d88cb94b4ba1ec8 |
| hovercard-subject-tag | issue:118577715 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-java/docker-java/382/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd1559e7cb2f06debe61bd230510dad03f2d880281018d90e1cb01942b250f3d/docker-java/docker-java/issues/382 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd1559e7cb2f06debe61bd230510dad03f2d880281018d90e1cb01942b250f3d/docker-java/docker-java/issues/382 |
| og:image:alt | I'm using the StatsCmd to pull stats from a running docker container. All stats are present except for the network statistics. I'm testing against docker version 1.9 (machine/boot2docker) running w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cosu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git |
| octolytics-dimension-user_id | 7772003 |
| octolytics-dimension-user_login | docker-java |
| octolytics-dimension-repository_id | 20415251 |
| octolytics-dimension-repository_nwo | docker-java/docker-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20415251 |
| octolytics-dimension-repository_network_root_nwo | docker-java/docker-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width