jesseduffield / lazydocker

The lazier way to manage everything docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPU metric is 0

eruizc-dev opened this issue · comments

Describe the bug

Lazydocker reports CPU usage as 0% (docker stats at the left for comparison). It's the same for all containers.

image

To Reproduce

I don't know the exact steps

Expected behaviour

The CPU usage should match docker stats

Desktop (please complete the following information):

  • OS: Raspbian Lite arm64v8
  • Hardware: Raspberry Pi 4B 8GB
  • Lazydocker Version: v0.12

Additional context

Docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.6.3-docker)

Server:
 Containers: 7
  Running: 7
  Paused: 0
  Stopped: 0
 Images: 19
 Server Version: 20.10.10
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 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: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 5b46e404f6b9f661a205e28d59c982d3634148f8
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.63-v8+
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.63GiB
 Name: homelab
 ID: AXKP:4RAO:NGGG:BSDO:SKO7:MXZV:DQSU:PEJH:QCPI:LCMX:FFZM:M2ZM
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Same here, host is raspberry pi 4 running ubuntu.
The Services tab shows the correct CPU usage, but the graph shows 0.
Memory usage is shown correctly.

I'm mainly using Docker Compose and if I start lazydocker in a compose context I'm getting CPU percentages in the services listing, but the total CPU usage under stats is always 0.

I have the same problem, I'm also using Debian 11 (bullseye). After reverting to cgroup v1 (debian 11 comes with cgroup v2) it worked fine.

Just added systemd.unified_cgroup_hierarchy=0 to the kernel cmdline (but editing /etc/default/grub and add into GRUB_CMDLINE_LINUX_DEFAULT) (raspberry-pi is different)

Should be fixed on master. Let me know if that's not the case!

Hey @jesseduffield , just to let you know that the problem is now solved (now the CPU metrics works on cgroup v2), thanks!

Congrats on the new release 🚀

ezoic increase your site revenue