docker stats returns zero inside LxC

dfc643

New Member
Sep 13, 2022
4
1
3
I have a docker running inside LxC (os: alpine),
PVE version: 7.2-3
Docker version: 20.10.11

add following options for LxC container:
Code:
lxc.mount.auto: cgroup:rw
lxc.mount.auto: proc:rw
lxc.mount.auto: sys:rw
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:
and docker running seems be ok.

but docker stats returns zero:
Code:
CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT   MEM %     NET I/O           BLOCK I/O   PIDS
7f8ad5212c8a   wxedge9   0.00%     0B / 0B             0.00%     60MB / 18.1MB     0B / 0B     0
5c8e0b5e249b   wxedge8   0.00%     0B / 0B             0.00%     33.6MB / 41.2MB   0B / 0B     0
50836005431d   wxedge7   0.00%     0B / 0B             0.00%     607kB / 556kB     0B / 0B     0
69fd528307ce   wxedge6   0.00%     0B / 0B             0.00%     621kB / 567kB     0B / 0B     0
08be63e689f4   wxedge5   0.00%     0B / 0B             0.00%     623kB / 567kB     0B / 0B     0
005a085b7bf3   wxedge4   0.00%     0B / 0B             0.00%     638kB / 573kB     0B / 0B     0
9a9cc7e11164   wxedge3   0.00%     0B / 0B             0.00%     607kB / 552kB     0B / 0B     0
9b3bf9be1f5f   wxedge2   0.00%     0B / 0B             0.00%     45.7MB / 29.4MB   0B / 0B     0
ab7b67e28458   wxedge1   0.00%     0B / 0B             0.00%     635kB / 584kB     0B / 0B     0
8e8b4ae21029   wxedge0   0.00%     0B / 0B             0.00%     23MB / 6.46MB     0B / 0B     0

i tried add kernel options:
Code:
cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=1
but it was useless.

so does anyone know how to make docker stats work?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!