fabriziosalmi / proxmox-lxc-autoscale

Automatically scale LXC containers resources on Proxmox hosts
https://fabriziosalmi.github.io/proxmox-lxc-autoscale/
MIT License
98 stars 3 forks source link

It seems unable to get the CPU loading #11

Closed brianread108 closed 2 weeks ago

brianread108 commented 2 weeks ago

I am getting this for all my LXCs 2024-11-08 12:22:55 - INFO - Container 104: CPU usage: 0.0%, Memory usage: 35.17MB (93.13% free of 512MB total), Initial cores: 1, Initial memory: 512MB Clearly it is not able to extract the CPU usage, so it has reduced all the cores to 1.

This is ProxMox 3.2.7 on Debian (installed from the ProxMox ISO)

This LXC is based in Rocky8, but the alpine ones also fail. The only one that has a non zero CPU usage is a Debian based LXC.

Server is: CPU(s) 8 x Intel(R) Xeon(R) CPU E3-1270 V2 @ 3.50GHz (1 Socket) Kernel Version Linux 6.8.12-2-pve (2024-09-05T10:03Z) Boot Mode Legacy BIOS Manager Version pve-manager/8.2.7/3e0176e6bb2ade3b

brianread108 commented 2 weeks ago

ok, I had a locale problem which was causing the "pct" commands to output an error message before the status etc. I guess that confused the CPU usage extraction. Am now getting CPU percentages and seeing adjustments.