All Projects → cha87de → Kvmtop

cha87de / Kvmtop

Licence: other
A monitoring tool for black box virtual machines from KVM hypervisor level

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kvmtop

Macos Simple Kvm
Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
Stars: ✭ 11,732 (+22903.92%)
Mutual labels:  virtual-machine, kvm
Linux Unattended Installation
This project provides all you need to create an unattended installation of a minimal setup of Linux.
Stars: ✭ 215 (+321.57%)
Mutual labels:  virtual-machine, kvm
Qemu Images
A collection of disk images and virtual machines that can be used by the QEMU emulator
Stars: ✭ 145 (+184.31%)
Mutual labels:  virtual-machine, kvm
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (+1964.71%)
Mutual labels:  virtual-machine, kvm
birsh
virsh replacement in bash
Stars: ✭ 14 (-72.55%)
Mutual labels:  virtual-machine, kvm
Kvm Vmi
KVM-based Virtual Machine Introspection
Stars: ✭ 153 (+200%)
Mutual labels:  virtual-machine, kvm
Runtime
Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
Stars: ✭ 2,103 (+4023.53%)
Mutual labels:  virtual-machine, kvm
Mist Ce
Mist is an open source, multi-cloud management platform
Stars: ✭ 1,391 (+2627.45%)
Mutual labels:  monitoring, kvm
wiser
🐎 Extremely minimal vmm for linux written in C. Hopefully someday will spin linux-vm for you.
Stars: ✭ 249 (+388.24%)
Mutual labels:  virtual-machine, kvm
evcloud
EVCloud是一个基于ceph和libvirt的轻量级云主机管理平台,实用稳定,维护简易
Stars: ✭ 44 (-13.73%)
Mutual labels:  virtual-machine, kvm
Cc Oci Runtime
OCI (Open Containers Initiative) compatible runtime for Intel® Architecture
Stars: ✭ 418 (+719.61%)
Mutual labels:  virtual-machine, kvm
virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (+21.57%)
Mutual labels:  virtual-machine, kvm
Runtime
OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Stars: ✭ 588 (+1052.94%)
Mutual labels:  virtual-machine, kvm
Giropops Monitoring
Full stack tools for monitoring containers and other stuff. ;)
Stars: ✭ 1,019 (+1898.04%)
Mutual labels:  monitoring
Jaeger Client Go
Jaeger Bindings for Go OpenTracing API.
Stars: ✭ 1,035 (+1929.41%)
Mutual labels:  monitoring
Munin C
C rewrite of various munin components
Stars: ✭ 43 (-15.69%)
Mutual labels:  monitoring
Hypervbackup
Utility for backing up HyperV virtual machines
Stars: ✭ 43 (-15.69%)
Mutual labels:  virtual-machine
Procmon Parser
Parser to process monitor file formats
Stars: ✭ 49 (-3.92%)
Mutual labels:  monitoring
Stackimpact Nodejs
DEPRECATED StackImpact Node.js Profiler - Production-Grade Performance Profiler: CPU, memory allocations, async calls, errors, metrics, and more
Stars: ✭ 46 (-9.8%)
Mutual labels:  monitoring
Statsviz
🚀 Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.) in the browser
Stars: ✭ 1,015 (+1890.2%)
Mutual labels:  monitoring

Codacy Badge Build Status GitHub release GitHub stars Go Report Card GoDoc Docker Pulls

What kvmtop does

kvmtop reads utilisation metrics about virtual machines running on a KVM hypervisor from the Linux proc filesystem and from libvirt.

Why yet another monitoring tool for virtual machines?

Kvmtop takes into account the difference between utilisation inside and outside the virtual machine, which differs in cases of overprovisioning. Kvmtop collects utilisation values of the hypervisor for virtual machines, to measure the overhead needed to run a virtual machine. Kvmtop will help to identify resource shortcomings, leading to the "noisy neighbour" effect.

The conceptual idea behind kvmtop is scientifically published and described in "Reviewing Cloud Monitoring: Towards Cloud Resource Profiling."

@inproceedings{hauser2018reviewing,
  title={Reviewing Cloud Monitoring: Towards Cloud Resource Profiling},
  author={Hauser, Christopher B and Wesner, Stefan},
  booktitle={2018 IEEE 11th International Conference on Cloud Computing (CLOUD)},
  pages={678--685},
  year={2018},
  organization={IEEE}
}

What does kvmtop offer?

The command line tool can be used by sysadmins, using a console ui. Text or JSON output further allows to process the monitoring data. A build in TCP output allows to send the data directly to a monitoring data sink, e.g. logstash.

Installation

Download and install the latest version of the kvmtop build. Available formats are the binary, Deb or Rpm packages, and a Docker image.

On Ubuntu, download the deb file and install it with dpkg -i kvmtop_VERSION_linux_amd64.deb. Similarly, on a rpm based system (e.g. Centos 7) with rpm -Uvh kvmtop_VERSION_linux_amd64.rpm.

Docker Usage

To use the Docker image, create a container from cha87de/kvmtop:master for the current master build or cha87de/kvmtop:latest to use the latest stable release.

docker run --rm \
  -v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
  --privileged --pid="host" \
  cha87de/kvmtop:latest \
  /bin/kvmtop -c qemu:///system --printer text --cpu --mem

Notes for Docker: i) If libvirt is accessible via a local socket, a volume has to mount this socket inside the container. ii) Containers per design isolate the container in its own process namespace, which hinders reading from the proc filesystem. --pid="host" softens this isolation, so kvmtop has access to the hosts proc files. iii) the --privileged is required for the IO Collector, which reads files only accessible as root user.

General Usage

Usage:
  kvmtop [OPTIONS]

Monitor virtual machine experience from outside on KVM hypervisor level

Application Options:
  -v, --version        Show version
  -f, --frequency=     Frequency (in seconds) for collecting metrics (default: 1)
  -r, --runs=          Amount of collection runs (default: -1)
  -c, --connection=    connection uri to libvirt daemon (default: qemu:///system)
      --procfs=        path to the proc filesystem (default: /proc)
      --verbose        Verbose output, adds more detailed fields
      --cpu            enable cpu metrics
      --mem            enable memory metrics
      --disk           enable disk metrics
      --net            enable network metrics
      --io             enable io metrics (requires root)
      --pressure       enable pressure metrics (requires kernel 4.20+)
      --host           enable host metrics
  -p, --printer=       the output printer to use (valid printers: ncurses, text, json) (default: ncurses)
  -o, --output=        the output channel to send printer output (valid output: stdout, file, tcp, udp) (default: stdout)
      --target=        for output 'file' the location, for 'tcp' or 'udp' the url (host:port) to the server
      --netdev=        The network device used for the virtual traffic

Help Options:
  -h, --help           Show this help message

Exemplary output

UUID                                 name          cpu_cores cpu_total cpu_steal cpu_other_total cpu_other_steal
0dbe2ae8-1ee4-4b43-bdf3-b533dfe75486 ubuntu14.04-2 2         53        0         5               1

Please note: although the connection to libvirt may work remote (e.g. via ssh), kvmtop requires access to the /proc file system of the hypervisor's operating system. You can use the --connection to connect to a remote libvirt, but need to mount the remote proc fs and specify the location with --procfs.

Printers and Outputs

Printers define the representation of the monitoring data. This can be for humans in ncurses, or for further processing text (space separated) or json.

Outputs define the location where the printers send data to. Output works for text and json printers, yet not for ncurses. The output may be a file or a remote tcp server.

Example scenarios:

# write monitoring data to log file
kvmtop --cpu --printer=text --output=file --target=/var/log/kvmtop.log

# send mointoring data to tcp server (e.g. logstash with tcp input)
kvmtop --cpu --printer=json --output=tcp --target=127.0.0.1:12345

Collectors & Their Fields

Collector cli option description
CPU Collector --cpu CPU Stats (host and VMs) like cores, utilisation, frequency
Memory Collector --mem Memory stats (host and VMs) like capacity, allocation, faults
Disk Collector --disk Disk stats (host and VMs) like capacity, utilisation, reads/writes, etc.
Network Collector --net Network stats (host and VMs) like transmitted and received bytes, packets, errors, etc.
I/O Collector --io Disk I/O stats (host and VMs) like reads/writes
PSI Collector --psi Pressure Stall Information (PSI) values (host only)
Host --host Host details (host only)

A more detailed list, including all metrics is available here at ./docs/README.md.

kvmtop with InfluxDB

kvmtop can be used as a monitoring agent to send data to an InfluxDB instance: kvmtop transmits JSON data via TCP to logstash, while logstash writes to InfluxDB. More detailes are available at https://github.com/cha87de/kvmtop-datasink/.

                                      kvmtop-datasink
                  +-----------------------------------------------------+
                  |                                                     |
+------------     | +------------+     +------------+     +-----------+ |
|           |     | |            |     |            |     |           | |
|  kvmtop   +---> | |  logstash  +---> |  influxdb  +---> |  grafana  | |
|           |     | |            |     |            |     |           | |
+------------     | +------------+     +------------+     +-----------+ |
                  |                                                     |
                  +-----------------------------------------------------+

Development Guide

Install the golang binary and the required dependencies libvirt-dev and libncurses5-dev packages. Create a new folder as your kvmtop workspace, e.g. /opt/kvmtop. Then follow these steps:

cd /opt/kvmtop
export GOPATH=$(pwd) # take workspace as GOPATH
go get -d github.com/cha87de/kvmtop/...   # download all source files, including depencencies
go install github.com/cha87de/kvmtop/...  # compile kvmtop binaries

The resulting binaries are then located in /opt/kvmtop/bin.

Further reading: https://golang.org/doc/code.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].