This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
developer-tools/java/chapters Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,25 @@ to see the output:
53
53
+
54
54
```
55
55
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
56
- 55198043b6aa 0.12% 267.3MiB / 1.952GiB 13.38% 782B / 0B 0B / 4.1kB 53
57
- 5b5dd33b675d 0.11% 274.2MiB / 1.952GiB 13.72% 782B / 0B 0B / 4.1kB 53
58
- 6e98a9597e6a 0.10% 273.2MiB / 1.952GiB 13.67% 1.03kB / 0B 0B / 4.1kB 51
56
+ 1f9d5a1c08a8 0.24% 294.9MiB / 1.952GiB 14.75% 828B / 0B 96.5MB / 4.1kB 115
59
57
```
60
58
+
61
- Note that the container id is shown in this case instead of container's name.
59
+ Note that the container id is shown instead of container's name in this case.
60
+ +
61
+ . Scale the service to 3 replicas:
62
+ +
63
+ ```
64
+ docker service scale web=3
65
+ ```
66
+ +
67
+ . The stats are now shown for all three containers:
68
+ +
69
+ ```
70
+ CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
71
+ 1f9d5a1c08a8 0.14% 287.8MiB / 1.952GiB 14.40% 1.03kB / 0B 96.5MB / 4.1kB 53
72
+ a3395efbb6ff 0.77% 263.4MiB / 1.952GiB 13.18% 578B / 0B 0B / 4.1kB 114
73
+ f484ff2f4c12 0.06% 294.8MiB / 1.952GiB 14.75% 578B / 0B 0B / 4.1kB 114
74
+ ```
62
75
+
63
76
. Display only container id and percent CPU utilization using the command `docker container stats --format "{{.Container}}: {{.CPUPerc}}"`:
64
77
+
You can’t perform that action at this time.
0 commit comments