On 27.08.2018 16:34, Marcelo Araujo wrote: > Hi Fabian, > > 2018-08-27 22:14 GMT+08:00 Fabian Freyer > <fabian.fre...@physik.tu-berlin.de > <mailto:fabian.fre...@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 _______________________________________________ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"