churchers / vm-bhyve

Shell based, minimal dependency bhyve manager
BSD 2-Clause "Simplified" License
806 stars 168 forks source link

How to gathering performance data? #352

Open WanpengQian opened 4 years ago

WanpengQian commented 4 years ago

Since vm _run run in background for every vm, is there any way to gethering vm performance data? such as CPU usage , IO usage etc. and output to a file. we can use other tool to analysis later.

churchers commented 4 years ago

Currently the vm _run process just blocks waiting for the bhyve process to end. It would be possible maybe to create a subcommand that outputs various details (cpu/memory usage etc) in some machine readable format that could be logged, but periodic logging would ideally need to be handled by a separate 'stats-gathering' process.

Another interesting idea would be to look at creating an extension for snmpd to create an OID tree containing the various running guests and stats. This could be used by most network management tools to graph/monitor guests. This wouldn't need to be part of, or rely on vm-bhyve though.

joeynwz commented 2 years ago

I really like the snmp idea churchers, but even a formatted stat dump would be nice that maybe has an output format option, i.e. formatted, csv, json, xml...