Re: [pve-devel] [PATCH pve-common/pve-manager/qemu-server 0/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Daniel Kral
On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: To monitor the CPU utilization of nodes and Qemu VMs at arbitrary intervals (e.g. every 30 seconds) via the Proxmox API, there are no suitable endpoints right now: /api2/json/nodes/{node}/status (cpu): Instant value /api2/json/nodes/{node}

Re: [pve-devel] [PATCH qemu-server 3/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Daniel Kral
On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: Add a map containing raw values from /proc//stat (utime, stime and guest_time), "uptime_ticks" and "user_hz" (from cpuinfo) to calcuate physical CPU usage from two samples. In addition, virtual CPU statistics based on /proc//task//schedstat

Re: [pve-devel] [PATCH pve-manager 2/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Daniel Kral
On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: Add a map containing raw values from /proc/stat and "uptime_ticks" which can be used in combination with cpuinfo.user_hz to calculate CPU usage from two samples. "uptime_ticks" is only defined at the top level, as /proc/stat is read once, s

[pve-devel] [PATCH common] tools: file_set_contents: use syswrite instead of print

2024-09-24 Thread Filip Schauer
The use of `print` can be inefficient for writing larger files due to its default buffering in 8 KiB blocks. This is especially problematic on `pmxcfs` where files are written in 4 KiB blocks due to the defaults of `libfuse2`. This leads to significant write amplification on files larger than 4 Ki

[pve-devel] [RFC PATCH 1/2] config: allow hypens and dots in config keys

2024-09-24 Thread Maximiliano Sandoval
The first character still has to be a letter. Signed-off-by: Maximiliano Sandoval --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index b26da505..1566cf91 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -23

[pve-devel] [RFC PATCH 2/2] config: add systemd credentials support

2024-09-24 Thread Maximiliano Sandoval
Allows to pass systemd credentials to a VM. See [1] for a description of systemd credentials. This can be potentially used to provision a VM as per [2]. Values can be passed either as plain text (which might be base64 encrypted) or by reading the contents of a snippet. A VM configuration file whic

Re: [pve-devel] [PATCH pve-manager 2/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Lukas Wagner
On 2024-09-24 14:25, Daniel Kral wrote: > On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: >> Add a map containing raw values from /proc/stat and "uptime_ticks" which >> can be used in combination with cpuinfo.user_hz to calculate CPU usage >> from two samples. "uptime_ticks" is only defin

Re: [pve-devel] [RFC firewall/proxmox{-ve-rs, -firewall, -perl-rs} 00/21] autogenerate ipsets for sdn objects

2024-09-24 Thread Thomas Lamprecht
Am 26/06/2024 um 14:15 schrieb Stefan Hanreich: > The current series generates all those ipsets in the datacenter scope. My > initial approach was to introduce an separate scope (sdn/), but I changed my > mind during the development because that would require non-trivial changes in > pve-firewall,