on bhyve statistics
Fabian Freyer
fabian.freyer at physik.tu-berlin.de
Mon Aug 27 14:56:23 UTC 2018
On 27.08.2018 16:34, Marcelo Araujo wrote:
> Hi Fabian,
>
> 2018-08-27 22:14 GMT+08:00 Fabian Freyer
> <fabian.freyer at physik.tu-berlin.de
> <mailto:fabian.freyer at physik.tu-berlin.de>>:
[...]
> - are the stats in struct bhyvestats {...} stats exposed or used in any
> non-obvious way?
>
>
> They are most used inside bhyverun by the name "stats" and the purpose
> is not really to collect statistics about the guest vm.
What are they used for? I only see them get increased, never actually
checked:
$ rg stats /usr/src/usr.sbin/bhyve
/usr/src/usr.sbin/bhyve/bhyverun.c
117:struct bhyvestats {
126:} stats;
510: stats.vmexit_bogus++;
521: stats.vmexit_reqidle++;
530: stats.vmexit_hlt++;
544: stats.vmexit_pause++;
555: stats.vmexit_mtrap++;
566: stats.vmexit_inst_emul++;
> - architecturally, what would be the best ways to get stats out of the
> user-space emulations? Off of the top of my head, I could think of the
> following possibilities:
> - prometheus exporter
> - having some socket or pipe to request them
> - DTrace probes
>
>
> I don't know what kind of stats do you need to collect, but based on the
> assumptions you listed above, maybe you can take a look at this project:
> https://github.com/freenas/bhyve-vm-goagent
>
> bhyve-vm-goagent can easily be extended to collect other information
> from guest. Although I'm not sure if it will be useful for your case,
> looks like you are looking for something less intrusive than
> bhyve-vm-goagent.
Thanks for the pointer - but you're right, I'm looking for
guest-agnostic monitoring on the host.
Fabian
More information about the freebsd-virtualization
mailing list