Tag: docke I needed to log the output of docker stats for a few of my containers in order to compare. The following snippet will log container stats to a file (stats.txt), and to stdout, every 1 second. Tweak it to your liking.
| |
docker stats --format 的默认字符串:"table {{.ID}}\\t{{.Name}}\\t{{.CPUPerc}}\\t{{.MemUsage}}\\t{{.MemPerc}}\\t{{.NetIO}}\\t{{.BlockIO}}\\t{{.PIDs}}"
Empirical Study on Swarm Leaerning 中用的:"table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.NetIO}},{{.BlockIO}},{{.PIDs}}"
| |