MCPcopy Index your code
hub / github.com/PANTHEONtech/vpptop

github.com/PANTHEONtech/vpptop @1.11

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.11 ↗ · + Follow
832 symbols 926 edges 10 files 230 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vpptop

Introduction

This is vpptop, a terminal only application implemented in Go. The goal of vpptop is to provide VPP statistics which are updated in real time.

The current version 1.11 supports statistics for: 1. interfaces 2. nodes 3. errors 4. memory usage per thread 5. thread data

asciicast

Install

In order to run vpptop you will need to install the dependencies first. 1. termui-go. go get github.com/gizak/termui

  1. GoVPP. go get git.fd.io/govpp.git

If you run into some problems with installing a dependency we suggest you read

their README.md file which you can find in the links provided above.

You will also need VPP with version at least 19.04-6. You can read about the

installation process here https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages.

After installing the dependencies you can run the application from the parent directory.

You may need root access.

sudo go run ./govpp-statsviewer/

NOTE:// Interfaces and Node names will not be displayed with VPP version below 19.04-6, which is the result of adding version-ing for the GoVPP stats-api

Binary API

This step is not needed to run GoVPP stats-viewer

Read this section only if you need to rebuild the binary APIs.

:For example if you want to run stats-viewer on a different VPP version.

You will need to install the binapi-generator in your $GOPATH. You can find the process of

the installation here https://github.com/FDio/govpp.

In go, go generate tool can be used to generate Go bindings from VPP APis in JSON format.

You can generate the bindigs from the root directory of the project using the command go generate.

By default it will use the JSON files stored in /usr/share/vpp/api/core/ and will generate the output

in the root directory of the project inside the bin_api directory.

In case you need to use different JSON files you can change it in the gen.go file. Where you can specify

the input directory of the JSON files and where the bindings should be generated.

//go:generate binapi-generator --input-dir=/usr/share/vpp/api/core/ --output-dir=bin_api

Usage

Keybindings: 1. Keyboard arrows Up, Down, Left, Right to switch tabs, scroll. 2. Crtl-Space open/close menu for sort by column for the active table. 3. / to filter the active table. 4. Esc to cancel the previous operation. 5. PgDn PgUp to skip pages in active table. 6. Ctrl-C to clear counters for the active table. 7. q to quit from the application

Extension points exported contracts — how you extend this code

Services (Interface)
Services represents VPP binary API services:
bin_api/vpe/vpe.ba.go
Services (Interface)
Services represents VPP binary API services:
bin_api/interfaces/interfaces.ba.go
Services (Interface)
Services represents VPP binary API services:
bin_api/ip/ip.ba.go

Core symbols most depended-on inside this repo

NewTable
called by 25
xtui/table.go
SetRect
called by 8
xtui/table.go
resizeWidgets
called by 6
widgets.go
paintActiveRow
called by 4
xtui/table.go
ScrollUp
called by 4
xtui/table.go
ScrollDown
called by 4
xtui/table.go
InitFilter
called by 4
xtui/table.go
updateTableRows
called by 2
main.go

Shape

Method 604
Struct 179
Function 39
TypeAlias 7
Interface 3

Languages

Go100%

Modules by API surface

bin_api/ip/ip.ba.go460 symbols
bin_api/interfaces/interfaces.ba.go232 symbols
bin_api/vpe/vpe.ba.go86 symbols
xtui/table.go17 symbols
stats/stats.go17 symbols
main.go10 symbols
xtui/table_test.go4 symbols
widgets.go3 symbols
sortstats.go3 symbols

For agents

$ claude mcp add vpptop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact