답변1
파이프로 하시면 됩니다안티필터:
docker stats --format "{{ .Name }},{{ .MemUsage }},{{ .MemPerc }},{{ .CPUPerc }}" | ansifilter > /home/test.txt
여러 줄 이 /home/test.txt
포함됩니다. 다음과 같습니다.
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,656KiB / 7.476GiB,0.01%,0.00%
alpine,528KiB / 7.476GiB,0.01%,0.00%
alpine,528KiB / 7.476GiB,0.01%,0.00%
alpine,528KiB / 7.476GiB,0.01%,0.03%
alpine,528KiB / 7.476GiB,0.01%,0.03%
alpine,528KiB / 7.476GiB,0.01%,0.02%