Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2018 16:56:21 +0200
From:      Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
To:        Marcelo Araujo <araujo@freebsd.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: on bhyve statistics
Message-ID:  <26beeb83-1e62-af39-5532-680062ee7d7d@physik.tu-berlin.de>
In-Reply-To: <CAOfEmZjzETMFHqVBXK3cjTs8bziCyZHfXQzzEJMxQGNCcNaMBg@mail.gmail.com>
References:  <c7b3952e-995a-3672-78e1-7341c159b5f4@physik.tu-berlin.de> <CAOfEmZjzETMFHqVBXK3cjTs8bziCyZHfXQzzEJMxQGNCcNaMBg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27.08.2018 16:34, Marcelo Araujo wrote:
> Hi Fabian,
> 
> 2018-08-27 22:14 GMT+08:00 Fabian Freyer
> <fabian.freyer@physik.tu-berlin.de
> <mailto:fabian.freyer@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?26beeb83-1e62-af39-5532-680062ee7d7d>