resource usage statistics on linux
- Parse /proc/<pid>/stat{,m}
- Divide {s,u}time by _SC_CLK_TCK
- Compute runtime from {s,u}time
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
* Add libnl-3 and libnl-route-3 dependency if Linux (libnl-3-dev on ubuntu)
* Add libnl-3 flags, refactor stats/dune
Use dune-configurtator to get C flags. In the dune-configurator script,
we detect whether we're running on Linux or FreeBSD.
- Vmm_console/log/stats do not read multiple times
console_add loops
console_subscribe terminates (a stream of messages is sent)
log data stream loops
log_subscribe terminates (a stream of data is sent)
stat_add loops
stat_remove loops
stat_subscribe terminates (a stream of stats is sent)
terminates means: reads once more, and closes socket after second read returned
loop processes further incoming data
don't use /tmp anymore, but /var/run/albatross for fifos + sockets + vm images,
and /var/db/albatross for ukvm-bin and crls, and /var/log/albatross for logging
vmm_console/vmm_log/vmm_stats_lwt: delete socket on startup if it exists
vmm_influxdb_stats: connects to vmm_stats socket and pushes every interval in
influxdb line format via tcp to specified host and port
- vm_open only once per vm (vmmapi_open), returning vmctx
- get stats descriptions only once in lifetime (vmmapi_statnames)
- close file descriptor on `remove_pid` (vmmapi_close)
vmm_stats_once: command line utility (for debugging) for stats gathering
- fix fd leak (always close socket)
- send first message (login) after renegotiation
vmm_stats:
- remove unneeded functionality (keeping old statistics around)
- translate internal tap names to bridge names
- gather statistics from vmmapi as well
vmm_prometheus_stats:
- new exporter of statistics to prometheus
*:
- fix typo in README
- style