Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Usage always zero #3469

Open
devicarus opened this issue Feb 16, 2024 · 3 comments
Open

Memory Usage always zero #3469

devicarus opened this issue Feb 16, 2024 · 3 comments

Comments

@devicarus
Copy link

cAdvisor is always showing 0 memory usage

HW: Raspberry Pi 5
OS: Debian 12

My docker-compose.yml:

cadvisor:
  image: gcr.io/cadvisor/cadvisor:v0.47.2
  container_name: cadvisor
  ports:
    - 8080:8080
  volumes:
    - /:/rootfs:ro
    - /var/run:/var/run:rw
    - /sys:/sys:ro
    - /var/lib/docker/:/var/lib/docker:ro
    - /dev/disk/:/dev/disk:ro
    - /etc/machine-id:/etc/machine-id:ro
  devices:
    - /dev/kmsg
  privileged: true
  restart: unless-stopped

Logs: cadvisor.log

@nathan815
Copy link

Same issue on a Raspberry Pi 4 running Debian 12/Raspbian. My docker-compose is nearly the same.

docker stats is also showing 0 memory on all containers, so there appears be a more general issue with Raspbian and Docker.

image

@nathan815
Copy link

Potential solution: append cgroup_memory=1 cgroup_enable=memory to /boot/cmdline.txt. I have not tried it yet as I can't restart my Pi right now.

stefanprodan/dockprom#228 (comment)

docker/for-linux#1112

@anorod
Copy link

anorod commented Apr 10, 2024

I tried @nathan815 fix on the file /boot/firmware/cmdline.txt of a Raspberry Pi 5 Model B Rev 1.0 running Debian GNU/Linux 12 (bookworm) aarch64 and now the memory shows around:

  • 1,3Gb Hot
  • 1,6Gb Total

But seems it's doubled of the reality:

$ free -m
               total       usado       libre  compartido   búf/caché   disponible
Mem:            8052         853        6209          28        1081        7198
Inter:          2047           0        2047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants