bufmon: add buffer monitoring plugin
This plugin allow to keep track of buffer usage in VPP graph nodes. The main use is to detect buffer leakages. Type: feature Change-Id: Iadcf4ab98207fab6e2fa375060879bc2a25b711e Signed-off-by: Benoît Ganne <bganne@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
a13100f3aa
commit
e09a2337b8
17
src/plugins/bufmon/CMakeLists.txt
Normal file
17
src/plugins/bufmon/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2020 Cisco and/or its affiliates.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
add_vpp_plugin(bufmon
|
||||
SOURCES
|
||||
bufmon.c
|
||||
)
|
8
src/plugins/bufmon/FEATURE.yaml
Normal file
8
src/plugins/bufmon/FEATURE.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
name: Buffers monitoring plugin
|
||||
maintainer: Benoît Ganne <bganne@cisco.com>
|
||||
features:
|
||||
- monitor buffer utiization in VPP graph nodes
|
||||
description: "monitor buffer utiization in VPP graph nodes"
|
||||
state: production
|
||||
properties: [CLI, MULTITHREAD]
|
313
src/plugins/bufmon/bufmon.c
Normal file
313
src/plugins/bufmon/bufmon.c
Normal file
File diff suppressed because it is too large
Load Diff
24
src/plugins/bufmon/bufmon_doc.md
Normal file
24
src/plugins/bufmon/bufmon_doc.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Buffers monitoring plugin {#bufmon_doc}
|
||||
|
||||
This plugin enables to track buffer utilization in the VPP graph nodes. The
|
||||
main use is to detect buffer leakage.
|
||||
It works by keeping track of number of buffer allocations and free in graph
|
||||
nodes and also of number of buffers received in input frames and in output
|
||||
frames.
|
||||
The formula to compute the number of "buffered" buffers in a node is simply:
|
||||
#buffered = #alloc + #input - #free - #output
|
||||
Note: monitoring will impact performances.
|
||||
|
||||
## Basic usage
|
||||
1. Turn buffer traces on:
|
||||
```
|
||||
~# vppctl set buffer traces on
|
||||
```
|
||||
2. Monitor buffer usage:
|
||||
```
|
||||
~# vppctl show buffer traces verbose
|
||||
```
|
||||
3. Turn buffer traces off:
|
||||
```
|
||||
~# vppctl set buffer traces off
|
||||
```
|
Reference in New Issue
Block a user