Hi, I'm trying to understand how to obtain resource usage information for a bhyve guest.
For the CPU, there's some info provided by bhyvectl, e.g.: /usr/sbin/bhyvectl --vm=bhyve --get-stats --cpu=1 in the field 'vcpu total runtime', for example: vcpu total runtime 8178870653 Two question about that: 1. What are the units used here? Looks like it's ticks, so if I want to convert this number, to, say, nanoseconds, would it be right to do something like: X * 1000**3 / kern.clockrate.stathz (X beeing the value returned by bhyvectl and kern.clockrate is a sysctl name)? 2. This value shows only vcpu time, without hypervisor time? For the memory stats, it's less obvious. Does guest always use an amount of memory specified at startup with '-m' (i.e. bhyve -m 1G) or it could use less? What is the format of bhyvectl --get-{low,high}mem output? PS I found it a little confusing that bhyvectl displays vcpu0 stats by default if --cpu is not provided, expected it provide info of all vcpus in the guest by default. Also, didn't find a way to get a number of vcpus in a running guest. Roman Bogorodskiy
pgpdf09dm2nHF.pgp
Description: PGP signature