vpptop is a Go implementation of real-time viewer for VPP metrics shown in dynamic terminal user interface.
Below is short demo preview of vpptop in action.
Branch | Info |
---|---|
support for vpp 19.08 work in progress | |
support for vpp 19.04 |
Following VPP metrics are currently supported:
- Interface stats - RX/TX packets/bytes, packet errors/drops/punts/IPv4..
- Node stats - clocks, vectors, calls, suspends..
- Error counters - node, reason
- Memory usage - free, used..
- Thread info - name, type, PID..
In order to install and run vpptop you need to install following requirements:
To install VPP from packagecloud on Ubuntu 18.04, run following commands:
curl -s https://packagecloud.io/install/repositories/fdio/1908/script.deb.sh | sudo bash
sudo apt-get install -y vpp vpp-dev vpp-plugin-core
For more info about how to install VPP from packages, see: https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages
For full support of interface and node names in vpptop, the VPP version has to be 19.04.1 or newer. The release version of VPP 19.04 will not work, because stats API versioning was added after the release of VPP 19.04 (it was backported to stable/1904 branch).
The vpptop uses VPP stats API for retrieving statistics. The VPP stats API is disabled by default and to enable it, add statseg
section to your VPP config, like this:
# enable stats socket (default at /run/vpp/stats.sock)
statseg {
default
}
To install vpptop run:
# install vpptop to $GOPATH/bin
$ go get -u github.com/PantheonTechnologies/vpptop
To start vpptop run:
# sudo might be required here, because of the permissions to stats socket file
$ sudo -E vpptop
vpptop also supports light terminal theme. To use darker colors which are better visible on light background,
you can set the VPPTOP_THEME_LIGHT
environment variable.
NOTE: The VPP should be running before starting vpptop!
- Keyboard arrows
Up, Down, Left, Right
to switch tabs, scroll. Crtl-Space
open/close menu for sort by column for the active table./
to filter the active table,Enter
to keep the filter.Esc
to cancel the previous operation.PgDn PgUp
to skip pages in active table.Ctrl-C
to clear counters for the active table.q
to quit from the application
This section is not required for running vpptop and provides info about vpptop development.
The vpptop uses GoVPP's binapi-generator to generate Go bindings for VPP binary API from JSON format. This should not normally be needed unless you want to use vpptop with different VPP version that has changed it's API.
For installation instructions for GoVPP's binapi-generator, see: https://github.com/FDio/govpp/blob/master/README.md
The vpptop uses go generate tool to actually run the binapi-generator. To run the generator simply go to the vpptop directory and run: go generate
.
//go:generate binapi-generator --input-dir=/usr/share/vpp/api/core/ --output-dir=bin_api
By default it will use the JSON files stored in /usr/share/vpp/api/core/
that are installed together with VPP and outputs the generated files to bin_api
directory.
In case you need to use different JSON files you can change the arguments in the gen.go
file, where you can specify the input directory of the JSON files and where the bindings should be generated.