xentop

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: LGPL-3.0 Imports: 8 Imported by: 1

README

go-xentop

Wraps xentop. Documentation is on godoc.

Xen prometheus exporter

As an example, the prometheus-xentop folder contains a webserver that exposes the xentop data to Prometheus.

$ go get github.com/bwesterb/go-xentop/prometheus-xentop
$ $GOROOT/bin/prometheus-xentop -bind 0:8080

Documentation

Overview

Go wrapper of the xentop utility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func XenTop

func XenTop(lines chan<- Line, errs chan<- error)

Runs xentop and writes lines and errors back over the provided channels.

func XenTopCmd

func XenTopCmd(lines chan<- Line, errs chan<- error, cmdPath string)

Types

type Line

type Line struct {
	Name               string  `field:"NAME"`
	State              string  `field:"STATE"`
	CpuTime            int64   `field:"CPU(sec)"`
	CpuFraction        float32 `field:"CPU(%)"`
	Memory             int64   `field:"MEM(k)"`
	MaxMemory          int64   `field:"MAXMEM(k)"`
	MemoryFraction     float32 `field:"MEM(%)"`
	MaxMemoryFraction  float32 `field:"MAXMEM(%)"`
	VirtualCpus        int64   `field:"VCPUS"`
	NetworkInterfaces  int64   `field:"NETS"`
	NetworkTx          int64   `field:"NETTX(k)"`
	NetworkRx          int64   `field:"NETRX(k)"`
	VirtualDisks       int64   `field:"VBDS"`
	DiskBlockedIO      int64   `field:"VBD_OO"`
	DiskReadOps        int64   `field:"VBD_RD"`
	DiskWriteOps       int64   `field:"VBD_WR"`
	DiskSectorsRead    int64   `field:"VBD_RSECT"`
	DiskSectorsWritten int64   `field:"VBD_WSECT"`
	SSID               int64   `field:"SSID"`
}

A line in xentop

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL