--- Begin Message ---
If the data is also to be processed by external metric servers, I think
the integration in `PVE::ProcFSTools::read_proc_stat()` makes sense. The
term `cpustat` would no longer conflict in this case, as the content
would be virtually the same. I would create a new patch series
--- Begin Message ---
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}/rrddata?timeframe=hour (cpu): Averag
--- Begin Message ---
Add "guest_time" (43) from /proc//stat.
Signed-off-by: Sascha Westermann
---
src/PVE/ProcFSTools.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/ProcFSTools.pm b/src/PVE/ProcFSTools.pm
index 3826fcc..5b0062e 100644
--- a/src/PVE/ProcFSTools.
--- Begin Message ---
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, so that core-specific raw values match
--- Begin Message ---
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 ( for virtual cores) are
added - bas