[Bug] RAM usage not being displayed on a Raspberry Pi 4 2Gb
Describe the bug When in System status the CPU for running apps is being displayed but not for RAM
To Reproduce Steps to reproduce the behavior:
- Go to 'System status'
- Click on 'CPU'
- Click on 'RAM'
- See error
Expected behavior RAM usage for running apps should be displayed
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Raspberry PI OS Lite 64-bit
- Browser Brave
- Version 0.4.3
Logs
run following command to collect corresponding logs:
sudo journalctl -xef -u casaos-gateway
sudo journalctl -xef -u casaos-user-service
sudo journalctl -xef -u casaos-local-storage
sudo journalctl -xef -u casaos.service
Additional context Add any other context about the problem here.
You can try using the following commands to read RAM docker stats
However, it seems that the Raspberry Pi official documentation does not support reading RAM directly.
@hazawer I have the same issue with Raspberry Pi 4 4GB. This solution worked for me: https://github.com/docker/for-linux/issues/1112#issuecomment-699512425. @raller1028 Thank you for the guidance with the docker stats 😉
@TomasValenta Thank you for your feedback, we will add this configuration to display the memory usage of the arm architecture in the future.
@hazawer You can directly add cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 in /boot/cmdline.txt
Then restart to see the memory usage of the application. Attached is my test case.
Yep, that worked a treat.
@TomasValenta Thank you for your feedback, we will add this configuration to display the memory usage of the arm architecture in the future. @hazawer You can directly add
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1in /boot/cmdline.txt Then restart to see the memory usage of the application. Attached is my test case.
worked like a magic ty
Update:
Now you have to add cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 in /boot/firmware/cmdline.txt
With latest RpiOS ✅
I have the similar issue my Host is
OS: Armbian (24.8.4) aarch64
Host: Radxa ZERO 3
Kernel: 6.1.75-vendor-rk35xx
Uptime: 5 hours, 51 mins
Packages: 1031 (dpkg)
Shell: bash 5.2.21
Terminal: /dev/pts/0
CPU: (4) @ 2.000GHz
Memory: 2653MiB / 3732MiB
I don't have /boot/cmdline.txt I do have armbianEnv.txt & boot.cmd
For above system I edit /boot/armbianEnv.txt & added the solution to extraargs= line (space separated)
It arguments are properly passed to kernel but bug is still there with latest CasaOS.
dmesg logs:
[ 15.630904] Kernel command line: root=UUID=eb6a27ef-3932-431f-92fd-e61fea75356c rootwait rootfstype=ext4 splash=verbose console=ttyS2,1500000 console=tty1 consoleblank=0 loglevel=1 ubootpart=f3aeb909-d11b-ec42-a52c-4507e474335c usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x25a2:u cma=256M cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
[ 15.631910] Unknown kernel command line parameters "splash=verbose ubootpart=f3aeb909-d11b-ec42-a52c-4507e474335c cgroup_enable=memory cgroup_memory=1", will be passed to user space.
.
.
.
[ 18.261976] Run /init as init process
[ 18.262019] with arguments:
[ 18.262028] /init
[ 18.262034] with environment:
[ 18.262039] HOME=/
[ 18.262044] TERM=linux
[ 18.262049] splash=verbose
[ 18.262054] ubootpart=f3aeb909-d11b-ec42-a52c-4507e474335c
[ 18.262060] cgroup_enable=memory
[ 18.262065] cgroup_memory=1
[ 18.263469] mmcblk1: p1 p2
Just add in the end of the code
"cgroup_enable=memory"
in /boot/firmwarte/cmdline.txt
the cmdline.txt will be like
console=serial0,115200 console=tty1 root=PARTUUID=5fe53d1e-02 rootfstype=ext4 fsck.repair=yes rootwait cgroup_enable=memory
