From owner-freebsd-virtualization@freebsd.org Mon Aug 27 15:20:01 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8634F108D9DB for ; Mon, 27 Aug 2018 15:20:01 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA699753A7 for ; Mon, 27 Aug 2018 15:20:00 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w7RFJupE011001; Mon, 27 Aug 2018 08:19:56 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7RFJt5J011000; Mon, 27 Aug 2018 08:19:55 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201808271519.w7RFJt5J011000@pdx.rh.CN85.dnsmgr.net> Subject: Re: on bhyve statistics In-Reply-To: To: Fabian Freyer Date: Mon, 27 Aug 2018 08:19:55 -0700 (PDT) CC: freebsd-virtualization@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 15:20:01 -0000 > Hi list, > > I'm currently looking at getting the libvirt prometheus exporter[1] to > work with libvirt+bhyve. In its current state this doesn't work because > at least one of the API calls exposed by libvirt isn't implemented by > the libvirt bhyve driver - so I started looking at implementing it. > > The first API call in question is virDomainBlockStats[2], which returns > statistics (number of read and written bytes and ops, respectively). > > Currently, bhyve does not expose any of these statistics. All the stats > available through bhyvectl --get-stats seem to be coming from the VMM, > not from the userspace emulation. That is correct, byhvectl is a diagnostics tool for getting information from the kernel/vmm module. > OTOH, I did see that there are *some* > stats being collected in bhyverun.c (see struct bhyvestats {...} > stats;). I can't see how these are exposed though - a grep of /usr/src > turned up no other uses. Which brings me to the following questions: > > - are the stats in struct bhyvestats {...} stats exposed or used in any > non-obvious way? Not that I am aware of. > - 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 wouldn't mind implementing any of the above, and so would like to know > which of these (or other options) would be the most acceptable, and > would appreciate some guidance. I differ to others on what may be the best way to do this. > CC'ing novel@ for the libvirt side, and grehan@ for the architectural > bhyve questions. You should replace @grehan with @jhb,@tychon as Peter has moved on, and John and Tycho are now the bhyve maintainers. I was going to add them, and remove Peter, but I see no cc: anyway, so I am sure that they are on the virtualization list though. > Fabian > > [1] https://github.com/kumina/libvirt_exporter > [2] https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockStats > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" -- Rod Grimes rgrimes@freebsd.org