docker / cli

The Docker CLI
Apache License 2.0
4.76k stars 1.89k forks source link

docker stats flickers #4348

Open DScheipers opened 1 year ago

DScheipers commented 1 year ago

Description

Running the command docker stats results in a flickering output.

Reproduce

docker stats

Expected behavior

docker stats should not flicker.

docker version

Client:
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.20.1 (110738)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:17 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    24.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.19
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  v0.12.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 5
  Running: 0
  Paused: 0
  Stopped: 5
 Images: 39
 Server Version: 24.0.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.10.16.3-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 7.188GiB
 Name: docker-desktop
 ID: 939218a6-637b-4631-9343-8b350b544b7f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Additional Info

Tested in the Winfows terminal and Cmder

AGMETEOR commented 1 year ago

Do you have a video showing this behavior?

DScheipers commented 1 year ago

Sure: https://github.com/docker/cli/assets/49644395/71c3fae3-6a8d-4257-8ffb-e8fda62507c1

sprig commented 8 months ago

Experiencing something similar, though much more pronounced on a docker client connected to podman engine via a tcp socket on localhost. In my case, some of the stats simply disappear and then reappear. This does not occur if I run podman stats.

Screen capture attached.

$ docker version
Client:
 Version:           24.0.5
 API version:       1.41 (downgraded from 1.43)
 Go version:        go1.20.7
 Git commit:        ced0996600
 Built:             Wed Oct  4 10:48:32 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: linux/amd64/gentoo-2.14
 Podman Engine:
  Version:          4.5.0
  APIVersion:       4.5.0
  Arch:             amd64
  BuildTime:        2023-09-13T03:08:51Z
  Experimental:     false
  GitCommit:        75e3c12579d391b81d871fd1cded6cf0d043550a
  GoVersion:        go1.20.7
  KernelVersion:    6.1.46-gentoo-dist-hardened
  MinAPIVersion:    4.0.0
  Os:               linux
 Conmon:
  Version:          conmon version 2.1.7, commit: v2.1.7
  Package:          app-containers/conmon-2.1.7
 OCI Runtime (crun):
  Version:          crun version 1.8.1
commit: f8a096be060b22ccd3d5f3ebe44108517fbf6c30
rundir: /run/crun
spec: 1.0.0
+SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  Package:          app-containers/crun-1.8.1
 Engine:
  Version:          4.5.0
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.20.7
  Git commit:       75e3c12579d391b81d871fd1cded6cf0d043550a
  Built:            Wed Sep 13 03:08:51 2023
  OS/Arch:          linux/amd64
  Experimental:     false

$ docker info
Client:
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.10.4
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.3
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 20
  Running: 5
  Paused: 0
  Stopped: 10
 Images: 99
 Server Version: 4.5.0
 Storage Driver: zfs
  Zpool: data
  Zpool Health: ONLINE
  Parent Dataset: data/vms/containers/storage
  Space Used By Parent: 48145747968
  Space Available: 47450235760640
  Parent Quota: no
  Compression: lz4
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge macvlan ipvlan
  Log: k8s-file none passthrough
 Swarm: inactive
 Runtimes: crun crun-wasm kata krun runc youki ocijail runj runsc
 Default Runtime: crun
 Init Binary:
 containerd version:
 runc version:
 init version:
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 6.1.46-gentoo-dist-hardened
 Operating System: gentoo
 OSType: linux
 Architecture: amd64
 CPUs: 8
 Total Memory: 251.6GiB

https://github.com/docker/cli/assets/2652983/657b5ef9-3578-4f2c-84b3-b061a2dc402b

 Name: pico
 ID: 46da1408-1430-40ab-b5dd-ea00718a6f8a
 Docker Root Dir: /var/lib/containers/storage
 Debug Mode: false
 Experimental: true
 Insecure Registries:
 Live Restore Enabled: false
 Product License: Apache-2.0

WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: bridge-nf-call-iptables is disabled
sprig commented 8 months ago

A couple of additional observations;

Hades32 commented 1 month ago

It's so annoying and has been like this forever. https://github.com/microsoft/terminal/issues/1680 came to the conclusion that it's not a terminal issue