[PATCH v2 3/4] bhyve: implement domainMemoryStats

2025-05-31 Thread Roman Bogorodskiy
Currently, bhyve does not support neither memory ballooning nor reporting guest memory usage. So the following information can be obtained: - RSS of the running process - Memory available to the guest (that is, guest total memory) Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_driver.c

[PATCH v2 2/4] virprocess: implement virProcessGetStatInfo() for FreeBSD

2025-05-31 Thread Roman Bogorodskiy
Use the "kern.proc.pid" sysctl and retrieve information from the kinfo_proc struct. Signed-off-by: Roman Bogorodskiy --- src/util/virprocess.c | 104 +++--- 1 file changed, 78 insertions(+), 26 deletions(-) diff --git a/src/util/virprocess.c b/src/util/virpro

[PATCH v2 0/4] bhyve: implement domain{Block,Interface,Memory}Stats

2025-05-31 Thread Roman Bogorodskiy
Changes since v1: - Added "bhyve: implement domainInterfaceStats" patch PS It was temping to factor out obtaining struct kinfo_proc using sysctlnametomib() + sysctl(), but I have to make it visible to use outside of virprocess, e.g. in bhyve_driver.c, so it doesn't look like it's worth the effor

[PATCH v2 1/4] bhyve: implement domainInterfaceStats

2025-05-31 Thread Roman Bogorodskiy
The virNetDevTapInterfaceStats() function already works on FreeBSD, so it's just a matter of wrapping that for domainInterfaceStats. Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_driver.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/bhyve/bhy

[PATCH v2 4/4] bhyve: implement domainBlockStats

2025-05-31 Thread Roman Bogorodskiy
Implement domainBlockStats for the bhyve driver. Only the read/write operations counts are reported as FreeBSD apparently doesn't support accumulative bytes read or written, though real-time data is available via rctl(8). There's also no information about the errors. Signed-off-by: Roman Bogorodsk