Proxmox Health

Just some useful commands for Proxmox Virtual Environment.

Watch system processes:

bash
1
2
htop
top

Show disk usage:

bash
1
pvesm status

Show root filesystem:

bash
1
df -Th /

Check RAM:

bash
1
watch -n 2 free -h

Enable memory overcommit vor Virtual Machines:

bash
1
echo "vm.overcommit_memory=1" >> /etc/sysctl.conf

Check Swap:

bash
1
cat /proc/swaps

Change swappiness:

bash
1
echo "vm.swappiness=10" >> /etc/sysctl.conf

Check swappiness:

bash
1
sysctl -p

Flushes swap usage and clears old RAM pages (without reboot)

bash
1
2
swapoff -a
swapon -a

Shows all active swaps:

bash
1
swapon --show

Start swap with priority:

bash
1
swapon -p 100 /dev/zram0

Check for zram and load it with modprobe if not showing up:

bash
1
2
3
ls /sys/block | grep zram
lsmod | grep zram
modprobe zram

Shows zram compression:

bash
1
zramctl

Restart zram:

bash
1
systemctl restart zramswap

Container config:

bash
1
2
vi /etc/pve/lxc/<id>.conf
pct config <id> | grep <search for config>

Check for oom issues: e.g. killing a process because of low RAM

bash
1
dmesg | grep -i oom

Set correct access privilges for the storage (so containers can access it)

bash
1
chown -R 101000:101000 <some-file>