Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:lxc [2024/04/10 19:19] – created none | wiki:lxc [2024/11/02 16:32] (current) – 5.152.82.90 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====Commnads===== | =====Commnads===== | ||
| - | **Get config** | + | **Config** |
| - | < | + | < |
| - | **Set cpu core count** | + | pct config < |
| - | < | + | pct set <id> --cores 4 --memory 2048 |
| - | **Set memory size** | + | pct resize <id> rootfs 32G |
| - | < | + | </ |
| - | **Set disk size** | + | |
| - | < | + | |
| + | **Images** | ||
| + | < | ||
| + | pveam available | ||
| + | pveam download local image.tar.gz | ||
| + | pveam list local | ||
| + | </ | ||
| + | |||
| + | =====LXC Kernel Logs===== | ||
| + | <code bash> | ||
| + | apt install -y ulogd2 | ||
| + | |||
| + | cp / | ||
| + | cat<< | ||
| + | [global] | ||
| + | logfile=" | ||
| + | loglevel=3 | ||
| + | stack=log1: | ||
| + | [log1] | ||
| + | group=1 | ||
| + | [iptables] | ||
| + | file="/ | ||
| + | sync=1 | ||
| + | EOF | ||
| + | |||
| + | systemctl restart ulogd | ||
| + | rm -rf / | ||
| + | </ | ||
| + | =====Memory Usage===== | ||
| + | <code bash> | ||
| + | total=0 | ||
| + | for i in $(pct list|grep running|awk ' | ||
| + | pct status $i --verbose|yq -r ' | ||
| + | total=$((total+$(pct status $i --verbose|yq -r ' | ||
| + | done | ||
| + | echo ${total}M | ||
| + | </ | ||
| =====Fix issue with Zabbix===== | =====Fix issue with Zabbix===== | ||
| <code file lxcfs.service> | <code file lxcfs.service> | ||