aboutsummaryrefslogtreecommitdiffstats
path: root/resources/templates
diff options
context:
space:
mode:
Diffstat (limited to 'resources/templates')
-rw-r--r--resources/templates/container/memif_create_chain_dma.exec10
-rw-r--r--resources/templates/telemetry/bpf_runtime.yaml752
-rw-r--r--resources/templates/telemetry/perf_stat_runtime.yaml134
-rw-r--r--resources/templates/telemetry/vpp_clear_stats.yaml272
-rw-r--r--resources/templates/telemetry/vpp_runtime.yaml209
-rw-r--r--resources/templates/telemetry/vpp_show_stats.yaml251
-rw-r--r--resources/templates/telemetry/vpp_test_teardown.yaml251
-rw-r--r--resources/templates/telemetry/vppctl_clear_stats.yaml272
-rw-r--r--resources/templates/telemetry/vppctl_runtime.yaml209
-rw-r--r--resources/templates/telemetry/vppctl_show_stats.yaml251
-rw-r--r--resources/templates/telemetry/vppctl_test_teardown.yaml251
-rw-r--r--resources/templates/vat/dhcp_proxy_dump.vat1
-rw-r--r--resources/templates/vat/dump_interfaces.vat3
-rw-r--r--resources/templates/vat/ipsec/ipsec_policy_add.vat1
-rw-r--r--resources/templates/vat/ipsec/ipsec_show.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_adjacency.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_local_eid.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_local_eid_mac.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_locator.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_locator_set.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_map_resolver.vat1
-rw-r--r--resources/templates/vat/lisp/add_lisp_remote_mapping.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_adjacency.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_local_eid.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_local_eid_mac.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_locator.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_locator_set.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_map_resolver.vat1
-rw-r--r--resources/templates/vat/lisp/del_lisp_remote_mapping.vat1
-rw-r--r--resources/templates/vat/lisp/lisp_eid_table_add_del_map.vat1
-rw-r--r--resources/templates/vat/lisp/lisp_gpe_iface.vat1
-rw-r--r--resources/templates/vat/lisp/lisp_gpe_status.vat1
-rw-r--r--resources/templates/vat/lisp/lisp_status.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_eid_table.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_gpe_tunnel.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_locator_set.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_map_register.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_map_request_mode.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_map_resolver.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_map_server.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_petr_config.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_pitr.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_rloc_config.vat1
-rw-r--r--resources/templates/vat/lisp/show_lisp_status.vat1
-rw-r--r--resources/templates/vat/show_hardware_detail.vat1
-rw-r--r--resources/templates/vat/vpp_route_add.vat1
-rw-r--r--resources/templates/vcl/vcl_dma.conf9
-rw-r--r--resources/templates/vcl/vcl_iperf3.conf9
-rw-r--r--resources/templates/vcl/vcl_nginx.conf12
-rw-r--r--resources/templates/vm/init.sh1
50 files changed, 2891 insertions, 39 deletions
diff --git a/resources/templates/container/memif_create_chain_dma.exec b/resources/templates/container/memif_create_chain_dma.exec
new file mode 100644
index 0000000000..e4dac71943
--- /dev/null
+++ b/resources/templates/container/memif_create_chain_dma.exec
@@ -0,0 +1,10 @@
+create memif socket id $sid1 filename $socket1
+create interface memif id $mid1 socket-id $sid1 master use-dma
+set int state memif$sid1/$mid1 up
+
+create memif socket id $sid2 filename $socket2
+create interface memif id $mid2 socket-id $sid2 master use-dma
+set int state memif$sid2/$mid2 up
+
+set interface l2 xconnect memif$sid2/$mid2 memif$sid1/$mid1
+set interface l2 xconnect memif$sid1/$mid1 memif$sid2/$mid2 \ No newline at end of file
diff --git a/resources/templates/telemetry/bpf_runtime.yaml b/resources/templates/telemetry/bpf_runtime.yaml
new file mode 100644
index 0000000000..e2e1fd52f1
--- /dev/null
+++ b/resources/templates/telemetry/bpf_runtime.yaml
@@ -0,0 +1,752 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+ sample_period: 100
+programs:
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: cpu_cycle
+ documentation: Cycles processed by CPUs
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x4 # RAW
+ name: 0x3C # INTEL_CORE_E_CPU_CLK_UNHALTED_THREAD_P
+ target: on_cpu_cycle
+ table: cpu_cycle
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(cpu_cycle, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_cpu_cycle(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ cpu_cycle.increment(key, ctx->sample_period);
+ return 0;
+ }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: cpu_instruction
+ documentation: Instructions retired by CPUs
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x4 # RAW
+ name: 0xC0 # INTEL_CORE_E_INST_RETIRED_ANY_P
+ target: on_cpu_instruction
+ table: cpu_instruction
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(cpu_instruction, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_cpu_instruction(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ cpu_instruction.increment(key, ctx->sample_period);
+ return 0;
+ }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: cache_references
+ documentation: Cache references
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x0 # HARDWARE
+ name: 0x2 # PERF_COUNT_HW_CACHE_REFERENCES
+ target: on_cache_reference
+ table: cache_references
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(cache_references, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_cache_reference(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ cache_references.increment(key, ctx->sample_period);
+ return 0;
+ }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: cache_miss
+ documentation: Cache misses
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x0 # HARDWARE
+ name: 0x3 # PERF_COUNT_HW_CACHE_MISSES
+ target: on_cache_miss
+ table: cache_miss
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(cache_miss, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_cache_miss(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ cache_miss.increment(key, ctx->sample_period);
+ return 0;
+ }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: branch_instruction
+# documentation: Instructions retired by branch
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x4 # PERF_COUNT_HW_BRANCH_INSTRUCTION
+# target: on_branch_instruction
+# table: branch_instruction
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(branch_instruction, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_branch_instruction(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# branch_instruction.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: branch_misses (not supported by CPU)
+# documentation: Last level miss operations by type
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x5 # PERF_COUNT_HW_BRANCH_MISSES
+# target: on_branch_misses
+# table: branch_misses
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(branch_misses, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_branch_misses(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# branch_misses.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: bus_cycles
+# documentation: Count of bus cycles
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x6 # PERF_COUNT_HW_BUS_CYCLES
+# target: on_bus_cycles
+# table: bus_cycles
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(bus_cycles, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+# int on_bus_cycles(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# bus_cycles.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: stalled_cycles_frontend (not supported by CPU)
+# documentation: Frontend stalled cycles
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x7 # PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
+# target: on_stalled_cycles_frontend
+# table: stalled_cycles_frontend
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(stalled_cycles_frontend, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_stalled_cycles_frontend(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# stalled_cycles_frontend.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: stalled_cycles_backend
+# documentation: Backend stalled cycles
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x8 # PERF_COUNT_HW_STALLED_CYCLES_BACKEND
+# target: on_stalled_cycles_backend
+# table: stalled_cycles_backend
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(stalled_cycles_backend, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_stalled_cycles_backend(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# stalled_cycles_backend.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: referenced_cpu_cycles
+# documentation: Referenced CPU cycles
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x0 # HARDWARE
+# name: 0x9 # PERF_COUNT_HW_REF_CPU_CYCLES
+# target: on_referenced_cpu_cycles
+# table: referenced_cpu_cycles
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(referenced_cpu_cycles, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_referenced_cpu_cycles(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# referenced_cpu_cycles.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: sw_cpu_clock
+# documentation: SW CPU clock
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x1 # SOFTWARE
+# name: 0x0 # PERF_COUNT_SW_CPU_CLOCK
+# target: on_sw_cpu_clock
+# table: sw_cpu_clock
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(sw_cpu_clock, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_sw_cpu_clock(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# sw_cpu_clock.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: sw_task_clock
+# documentation: SW task clock
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x1 # SOFTWARE
+# name: 0x1 # PERF_COUNT_SW_TASK_CLOCK
+# target: on_sw_task_clock
+# table: sw_task_clock
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(sw_task_clock, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_sw_task_clock(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# sw_task_clock.increment(key, ctx->sample_period);
+# return 0;
+# }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: sw_page_faults
+# documentation: SW page faults
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x1 # SOFTWARE
+# name: 0x2 # PERF_COUNT_SW_PAGE_FAULTS
+# target: on_sw_page_faults
+# table: sw_page_faults
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(sw_page_faults, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_sw_page_faults(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# sw_page_faults.increment(key, ctx->sample_period);
+# return 0;
+# }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: sw_context_switches
+ documentation: SW context switches
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x1 # SOFTWARE
+ name: 0x3 # PERF_COUNT_SW_CONTEXT_SWITCHES
+ target: on_sw_context_switches
+ table: sw_context_switches
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(sw_context_switches, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_sw_context_switches(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ sw_context_switches.increment(key, ctx->sample_period);
+ return 0;
+ }
+# - name: bundle_bpf
+# metrics:
+# counter:
+# - name: sw_cpu_migrations
+# documentation: SW cpu migrations
+# namespace: bpf
+# labelnames:
+# - name
+# - cpu
+# - pid
+# events:
+# - type: 0x1 # SOFTWARE
+# name: 0x4 # PERF_COUNT_SW_CPU_MIGRATIONS
+# target: on_sw_cpu_migrations
+# table: sw_cpu_migrations
+# code: |
+# #include <linux/ptrace.h>
+# #include <uapi/linux/bpf_perf_event.h>
+#
+# const int max_cpus = 256;
+#
+# struct key_t {
+# int cpu;
+# int pid;
+# char name[TASK_COMM_LEN];
+# };
+#
+# BPF_HASH(sw_cpu_migrations, struct key_t);
+#
+# static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+# key->cpu = bpf_get_smp_processor_id();
+# key->pid = bpf_get_current_pid_tgid();
+# bpf_get_current_comm(&(key->name), sizeof(key->name));
+# }
+#
+# int on_sw_cpu_migrations(struct bpf_perf_event_data *ctx) {
+# struct key_t key = {};
+# get_key(&key);
+#
+# sw_cpu_migrations.increment(key, ctx->sample_period);
+# return 0;
+# }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: sw_page_faults_min
+ documentation: SW page faults minor
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x1 # SOFTWARE
+ name: 0x5 # PERF_COUNT_SW_PAGE_FAULTS_MIN
+ target: on_sw_page_faults_min
+ table: sw_page_faults_min
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(sw_page_faults_min, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_sw_page_faults_min(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ sw_page_faults_min.increment(key, ctx->sample_period);
+ return 0;
+ }
+ - name: bundle_bpf
+ metrics:
+ counter:
+ - name: sw_page_faults_maj
+ documentation: SW page faults major
+ namespace: bpf
+ labelnames:
+ - name
+ - cpu
+ - pid
+ events:
+ - type: 0x1 # SOFTWARE
+ name: 0x6 # PERF_COUNT_SW_PAGE_FAULTS_MAJ
+ target: on_sw_page_faults_maj
+ table: sw_page_faults_maj
+ code: |
+ #include <linux/ptrace.h>
+ #include <uapi/linux/bpf_perf_event.h>
+
+ const int max_cpus = 256;
+
+ struct key_t {
+ int cpu;
+ int pid;
+ char name[TASK_COMM_LEN];
+ };
+
+ BPF_HASH(sw_page_faults_maj, struct key_t);
+
+ static inline __attribute__((always_inline)) void get_key(struct key_t* key) {
+ key->cpu = bpf_get_smp_processor_id();
+ key->pid = bpf_get_current_pid_tgid();
+ bpf_get_current_comm(&(key->name), sizeof(key->name));
+ }
+
+ int on_sw_page_faults_maj(struct bpf_perf_event_data *ctx) {
+ struct key_t key = {};
+ get_key(&key);
+
+ sw_page_faults_maj.increment(key, ctx->sample_period);
+ return 0;
+ }
diff --git a/resources/templates/telemetry/perf_stat_runtime.yaml b/resources/templates/telemetry/perf_stat_runtime.yaml
new file mode 100644
index 0000000000..ae0f804945
--- /dev/null
+++ b/resources/templates/telemetry/perf_stat_runtime.yaml
@@ -0,0 +1,134 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: cpu_cycles
+ documentation: Cycles processed by CPUs
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0x3C # cpu-cycles
+ umask: 0x00
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: instructions
+ documentation: Instructions retired by CPUs
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xC0 # instructions
+ umask: 0x00
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l1_hit
+ documentation: L1 Hit
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L1_HIT
+ umask: 0x01
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l2_hit
+ documentation: L2 Hit
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L2_HIT
+ umask: 0x02
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l3_hit
+ documentation: L3 Hit
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L3_HIT
+ umask: 0x04
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l1_miss
+ documentation: L1 Miss
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L1_MISS
+ umask: 0x08
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l2_miss
+ documentation: L2 Miss
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L2_MISS
+ umask: 0x10
+ - name: bundle_perf_stat
+ metrics:
+ counter:
+ - name: mem_load_uops_retired_l3_miss
+ documentation: L3 Miss
+ namespace: perf_stat
+ labelnames:
+ - thread
+ - pid
+ events:
+ - eventcode: 0xD1 # MEM_LOAD_UOPS_RETIRED.L3_MISS
+ umask: 0x20
diff --git a/resources/templates/telemetry/vpp_clear_stats.yaml b/resources/templates/telemetry/vpp_clear_stats.yaml
new file mode 100644
index 0000000000..72c20604ee
--- /dev/null
+++ b/resources/templates/telemetry/vpp_clear_stats.yaml
@@ -0,0 +1,272 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ clear runtime
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ clear interfaces
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ clear hardware
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ clear node counters
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
+ labelnames:
+ - name
+ - thread_name
+ - thread_id
+ - name: packets
+ documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
+ labelnames:
+ - name
+ - thread_name
+ - thread_id
+ code: |
+ perfmon reset
diff --git a/resources/templates/telemetry/vpp_runtime.yaml b/resources/templates/telemetry/vpp_runtime.yaml
new file mode 100644
index 0000000000..d7beb23cc6
--- /dev/null
+++ b/resources/templates/telemetry/vpp_runtime.yaml
@@ -0,0 +1,209 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ clear runtime
+ wait {duration}
+ show runtime
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Instructions/packet, cycles/packet and IPC (calls)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: packets
+ documentation: Instructions/packet, cycles/packet and IPC (packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: packets_per_call
+ documentation: Instructions/packet, cycles/packet and IPC (packets/call)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: clocks_per_packets
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: instructions_per_packets
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: ipc
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ code: |
+ perfmon reset
+ perfmon start bundle inst-and-clock
+ wait {duration}
+ perfmon stop
+ show perfmon statistics
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: l1_hit
+ documentation: Cache hits and misses (L1 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l1_miss
+ documentation: Cache hits and misses (L1 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l2_hit
+ documentation: Cache hits and misses (L2 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l2_miss
+ documentation: Cache hits and misses (L2 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l3_hit
+ documentation: Cache hits and misses (L3 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l3_miss
+ documentation: Cache hits and misses (L3 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ code: |
+ perfmon reset
+ perfmon start bundle cache-hierarchy
+ wait {duration}
+ perfmon stop
+ show perfmon statistics
diff --git a/resources/templates/telemetry/vpp_show_stats.yaml b/resources/templates/telemetry/vpp_show_stats.yaml
new file mode 100644
index 0000000000..626839f410
--- /dev/null
+++ b/resources/templates/telemetry/vpp_show_stats.yaml
@@ -0,0 +1,251 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ show runtime
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ show interface
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ show hardware verbose
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ show node counters verbose
diff --git a/resources/templates/telemetry/vpp_test_teardown.yaml b/resources/templates/telemetry/vpp_test_teardown.yaml
new file mode 100644
index 0000000000..ac096526ce
--- /dev/null
+++ b/resources/templates/telemetry/vpp_test_teardown.yaml
@@ -0,0 +1,251 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 0
+programs:
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ show runtime
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ show interface
+ - name: bundle_vpp
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ show hardware verbose
+ - name: bundle_vpp
+ metrics:
+ counter:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ show node counters verbose
diff --git a/resources/templates/telemetry/vppctl_clear_stats.yaml b/resources/templates/telemetry/vppctl_clear_stats.yaml
new file mode 100644
index 0000000000..b23081e4f2
--- /dev/null
+++ b/resources/templates/telemetry/vppctl_clear_stats.yaml
@@ -0,0 +1,272 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ vppctl -s {socket} clear runtime
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} clear interfaces
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} clear hardware
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} clear node counters
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
+ labelnames:
+ - name
+ - thread_name
+ - thread_id
+ - name: packets
+ documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
+ labelnames:
+ - name
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} perfmon reset
diff --git a/resources/templates/telemetry/vppctl_runtime.yaml b/resources/templates/telemetry/vppctl_runtime.yaml
new file mode 100644
index 0000000000..2ac72c0b8a
--- /dev/null
+++ b/resources/templates/telemetry/vppctl_runtime.yaml
@@ -0,0 +1,209 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ vppctl -s {socket} clear runtime
+ sleep {duration}
+ vppctl -s {socket} show runtime
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: calls
+ documentation: Instructions/packet, cycles/packet and IPC (calls)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: packets
+ documentation: Instructions/packet, cycles/packet and IPC (packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: packets_per_call
+ documentation: Instructions/packet, cycles/packet and IPC (packets/call)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: clocks_per_packets
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: instructions_per_packets
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: ipc
+ documentation: Instructions/packet, cycles/packet and IPC (clocks/packets)
+ namespace: vpp
+ subsystem: inst_and_clock
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} perfmon reset
+ vppctl -s {socket} perfmon start bundle inst-and-clock
+ sleep {duration}
+ vppctl -s {socket} perfmon stop
+ vppctl -s {socket} show perfmon statistics
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: l1_hit
+ documentation: Cache hits and misses (L1 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l1_miss
+ documentation: Cache hits and misses (L1 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l2_hit
+ documentation: Cache hits and misses (L2 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l2_miss
+ documentation: Cache hits and misses (L2 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l3_hit
+ documentation: Cache hits and misses (L3 hit)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ - name: l3_miss
+ documentation: Cache hits and misses (L3 miss)
+ namespace: vpp
+ subsystem: cache_hierarchy
+ labelnames:
+ - node_name
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} perfmon reset
+ vppctl -s {socket} perfmon start bundle cache-hierarchy
+ sleep {duration}
+ vppctl -s {socket} perfmon stop
+ vppctl -s {socket} show perfmon statistics
diff --git a/resources/templates/telemetry/vppctl_show_stats.yaml b/resources/templates/telemetry/vppctl_show_stats.yaml
new file mode 100644
index 0000000000..9f5a0240a1
--- /dev/null
+++ b/resources/templates/telemetry/vppctl_show_stats.yaml
@@ -0,0 +1,251 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 1
+programs:
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ vppctl -s {socket} show runtime
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} show interface
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} show hardware verbose
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} show node counters verbose
diff --git a/resources/templates/telemetry/vppctl_test_teardown.yaml b/resources/templates/telemetry/vppctl_test_teardown.yaml
new file mode 100644
index 0000000000..e8458f7198
--- /dev/null
+++ b/resources/templates/telemetry/vppctl_test_teardown.yaml
@@ -0,0 +1,251 @@
+---
+logging:
+ version: 1
+ formatters:
+ console_stdout:
+ format: '%(asctime)s - %(name)s - %(message)s'
+ console_stderr:
+ format: '%(message)s'
+ prom:
+ format: '%(message)s'
+ handlers:
+ console_stdout:
+ class: logging.StreamHandler
+ level: INFO
+ formatter: console_stdout
+ stream: ext://sys.stdout
+ console_stderr:
+ class: logging.StreamHandler
+ level: ERROR
+ formatter: console_stderr
+ stream: ext://sys.stderr
+ prom:
+ class: logging.handlers.RotatingFileHandler
+ level: INFO
+ formatter: prom
+ filename: /tmp/metric.prom
+ mode: w
+ loggers:
+ prom:
+ handlers: [prom]
+ level: INFO
+ propagate: False
+ root:
+ level: INFO
+ handlers: [console_stdout, console_stderr]
+scheduler:
+ duration: 0
+programs:
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: calls
+ documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors
+ documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: suspends
+ documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: clocks
+ documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ - name: vectors_calls
+ documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
+ labelnames:
+ - node_name
+ - state
+ - thread_name
+ - thread_id
+ - thread_lcore
+ code: |
+ vppctl -s {socket} show runtime
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: rx_packets
+ documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_packets
+ documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: tx_error
+ documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: drops
+ documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: punt
+ documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip4
+ documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: ip6
+ documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: mpls
+ documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_no_buf
+ documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ - name: rx_miss
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} show interface
+ - name: bundle_vppctl
+ metrics:
+ gauge:
+ - name: rx_frames
+ documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_bytes
+ documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_frames
+ documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_bytes
+ documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: rx_missed
+ documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ - name: tx_missed
+ documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
+ labelnames:
+ - name
+ - index
+ code: |
+ vppctl -s {socket} show hardware verbose
+ - name: bundle_vppctl
+ metrics:
+ counter:
+ - name: node_counter
+ documentation: Node counter
+ namespace: vpp
+ subsystem: node
+ labelnames:
+ - name
+ - reason
+ - severity
+ - thread_name
+ - thread_id
+ code: |
+ vppctl -s {socket} show node counters verbose
diff --git a/resources/templates/vat/dhcp_proxy_dump.vat b/resources/templates/vat/dhcp_proxy_dump.vat
deleted file mode 100644
index 584a58b5c6..0000000000
--- a/resources/templates/vat/dhcp_proxy_dump.vat
+++ /dev/null
@@ -1 +0,0 @@
-dhcp_proxy_dump {ipv6}
diff --git a/resources/templates/vat/dump_interfaces.vat b/resources/templates/vat/dump_interfaces.vat
deleted file mode 100644
index dfc5e6939d..0000000000
--- a/resources/templates/vat/dump_interfaces.vat
+++ /dev/null
@@ -1,3 +0,0 @@
-sw_interface_dump
-dump_interface_table
-quit
diff --git a/resources/templates/vat/ipsec/ipsec_policy_add.vat b/resources/templates/vat/ipsec/ipsec_policy_add.vat
deleted file mode 100644
index db025970b6..0000000000
--- a/resources/templates/vat/ipsec/ipsec_policy_add.vat
+++ /dev/null
@@ -1 +0,0 @@
-exec ipsec policy add spd {spd_id} priority {priority} {direction} action {action} {selector}
diff --git a/resources/templates/vat/ipsec/ipsec_show.vat b/resources/templates/vat/ipsec/ipsec_show.vat
deleted file mode 100644
index 0859d878c9..0000000000
--- a/resources/templates/vat/ipsec/ipsec_show.vat
+++ /dev/null
@@ -1 +0,0 @@
-exec show ipsec
diff --git a/resources/templates/vat/lisp/add_lisp_adjacency.vat b/resources/templates/vat/lisp/add_lisp_adjacency.vat
deleted file mode 100644
index 9c33625f6b..0000000000
--- a/resources/templates/vat/lisp/add_lisp_adjacency.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_adjacency add vni {vni} reid {deid}{deid_prefix} leid {seid}{seid_prefix}
diff --git a/resources/templates/vat/lisp/add_lisp_local_eid.vat b/resources/templates/vat/lisp/add_lisp_local_eid.vat
deleted file mode 100644
index 4f57549d75..0000000000
--- a/resources/templates/vat/lisp/add_lisp_local_eid.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_local_eid vni {vni} eid {eid}/{eid_prefix} locator-set {locator_name} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/add_lisp_local_eid_mac.vat b/resources/templates/vat/lisp/add_lisp_local_eid_mac.vat
deleted file mode 100644
index cf0fb3221c..0000000000
--- a/resources/templates/vat/lisp/add_lisp_local_eid_mac.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_local_eid vni {vni} eid {eid} locator-set {locator_name} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/add_lisp_locator.vat b/resources/templates/vat/lisp/add_lisp_locator.vat
deleted file mode 100644
index 4d50326883..0000000000
--- a/resources/templates/vat/lisp/add_lisp_locator.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_locator locator-set {lisp_name} sw_if_index {sw_if_index} p {priority} w {weight} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/add_lisp_locator_set.vat b/resources/templates/vat/lisp/add_lisp_locator_set.vat
deleted file mode 100644
index 0dccbb71c9..0000000000
--- a/resources/templates/vat/lisp/add_lisp_locator_set.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_locator_set locator-set {lisp_name} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/add_lisp_map_resolver.vat b/resources/templates/vat/lisp/add_lisp_map_resolver.vat
deleted file mode 100644
index 8daa286e8e..0000000000
--- a/resources/templates/vat/lisp/add_lisp_map_resolver.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_map_resolver {address} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/add_lisp_remote_mapping.vat b/resources/templates/vat/lisp/add_lisp_remote_mapping.vat
deleted file mode 100644
index 6dcb4f91cd..0000000000
--- a/resources/templates/vat/lisp/add_lisp_remote_mapping.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_remote_mapping add vni {vni} eid {deid}{deid_prefix} seid {seid}{seid_prefix} rloc {rloc}
diff --git a/resources/templates/vat/lisp/del_lisp_adjacency.vat b/resources/templates/vat/lisp/del_lisp_adjacency.vat
deleted file mode 100644
index a507adce4a..0000000000
--- a/resources/templates/vat/lisp/del_lisp_adjacency.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_adjacency del vni {vni} reid {deid}/{deid_prefix} leid {seid}/{seid_prefix}
diff --git a/resources/templates/vat/lisp/del_lisp_local_eid.vat b/resources/templates/vat/lisp/del_lisp_local_eid.vat
deleted file mode 100644
index 1df6b3ffec..0000000000
--- a/resources/templates/vat/lisp/del_lisp_local_eid.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_local_eid vni {vni} eid {eid}/{eid_prefix} locator-set {locator_name} del \ No newline at end of file
diff --git a/resources/templates/vat/lisp/del_lisp_local_eid_mac.vat b/resources/templates/vat/lisp/del_lisp_local_eid_mac.vat
deleted file mode 100644
index 1c188bc039..0000000000
--- a/resources/templates/vat/lisp/del_lisp_local_eid_mac.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_local_eid vni <vni> eid {eid} locator-set {locator_name} del \ No newline at end of file
diff --git a/resources/templates/vat/lisp/del_lisp_locator.vat b/resources/templates/vat/lisp/del_lisp_locator.vat
deleted file mode 100644
index 243e113e59..0000000000
--- a/resources/templates/vat/lisp/del_lisp_locator.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_locator locator-set {lisp_name} sw_if_index {sw_if_index} p {priority} w {weight} del
diff --git a/resources/templates/vat/lisp/del_lisp_locator_set.vat b/resources/templates/vat/lisp/del_lisp_locator_set.vat
deleted file mode 100644
index 11049f9c50..0000000000
--- a/resources/templates/vat/lisp/del_lisp_locator_set.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_locator_set locator-set {lisp_name} del \ No newline at end of file
diff --git a/resources/templates/vat/lisp/del_lisp_map_resolver.vat b/resources/templates/vat/lisp/del_lisp_map_resolver.vat
deleted file mode 100644
index 36de8a56b2..0000000000
--- a/resources/templates/vat/lisp/del_lisp_map_resolver.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_map_resolver {address} del \ No newline at end of file
diff --git a/resources/templates/vat/lisp/del_lisp_remote_mapping.vat b/resources/templates/vat/lisp/del_lisp_remote_mapping.vat
deleted file mode 100644
index 515611ffd0..0000000000
--- a/resources/templates/vat/lisp/del_lisp_remote_mapping.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_add_del_remote_mapping del vni {vni} eid {deid}/{deid_prefix} seid {seid}/{seid_prefix} rloc {rloc}
diff --git a/resources/templates/vat/lisp/lisp_eid_table_add_del_map.vat b/resources/templates/vat/lisp/lisp_eid_table_add_del_map.vat
deleted file mode 100644
index beba91c60a..0000000000
--- a/resources/templates/vat/lisp/lisp_eid_table_add_del_map.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_eid_table_add_del_map vni {vni} {bd_or_vrf} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/lisp_gpe_iface.vat b/resources/templates/vat/lisp/lisp_gpe_iface.vat
deleted file mode 100644
index 1f5eaf0880..0000000000
--- a/resources/templates/vat/lisp/lisp_gpe_iface.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_gpe_add_del_iface {state} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/lisp_gpe_status.vat b/resources/templates/vat/lisp/lisp_gpe_status.vat
deleted file mode 100644
index 5c4080afc5..0000000000
--- a/resources/templates/vat/lisp/lisp_gpe_status.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_gpe_enable_disable {state}
diff --git a/resources/templates/vat/lisp/lisp_status.vat b/resources/templates/vat/lisp/lisp_status.vat
deleted file mode 100644
index d7e97577d6..0000000000
--- a/resources/templates/vat/lisp/lisp_status.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_enable_disable {state}
diff --git a/resources/templates/vat/lisp/show_lisp_eid_table.vat b/resources/templates/vat/lisp/show_lisp_eid_table.vat
deleted file mode 100644
index 4a47a8fdef..0000000000
--- a/resources/templates/vat/lisp/show_lisp_eid_table.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_eid_table_dump \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_gpe_tunnel.vat b/resources/templates/vat/lisp/show_lisp_gpe_tunnel.vat
deleted file mode 100644
index 802cfbb6a0..0000000000
--- a/resources/templates/vat/lisp/show_lisp_gpe_tunnel.vat
+++ /dev/null
@@ -1 +0,0 @@
-# TODO: Implement when VPP-334 is fixed. \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_locator_set.vat b/resources/templates/vat/lisp/show_lisp_locator_set.vat
deleted file mode 100644
index 4f775ff47a..0000000000
--- a/resources/templates/vat/lisp/show_lisp_locator_set.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_locator_set_dump {filter} \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_map_register.vat b/resources/templates/vat/lisp/show_lisp_map_register.vat
deleted file mode 100644
index ea6847862e..0000000000
--- a/resources/templates/vat/lisp/show_lisp_map_register.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_map_register_state \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_map_request_mode.vat b/resources/templates/vat/lisp/show_lisp_map_request_mode.vat
deleted file mode 100644
index 2c8a44ee5c..0000000000
--- a/resources/templates/vat/lisp/show_lisp_map_request_mode.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_map_request_mode \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_map_resolver.vat b/resources/templates/vat/lisp/show_lisp_map_resolver.vat
deleted file mode 100644
index e74dab9e87..0000000000
--- a/resources/templates/vat/lisp/show_lisp_map_resolver.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_map_resolver_dump \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_map_server.vat b/resources/templates/vat/lisp/show_lisp_map_server.vat
deleted file mode 100644
index 3f7dd08a85..0000000000
--- a/resources/templates/vat/lisp/show_lisp_map_server.vat
+++ /dev/null
@@ -1 +0,0 @@
-lisp_map_server_dump \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_petr_config.vat b/resources/templates/vat/lisp/show_lisp_petr_config.vat
deleted file mode 100644
index e12be15f84..0000000000
--- a/resources/templates/vat/lisp/show_lisp_petr_config.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_use_petr \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_pitr.vat b/resources/templates/vat/lisp/show_lisp_pitr.vat
deleted file mode 100644
index e1280d16ba..0000000000
--- a/resources/templates/vat/lisp/show_lisp_pitr.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_pitr \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_rloc_config.vat b/resources/templates/vat/lisp/show_lisp_rloc_config.vat
deleted file mode 100644
index 78c58ea92e..0000000000
--- a/resources/templates/vat/lisp/show_lisp_rloc_config.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_rloc_probe_state \ No newline at end of file
diff --git a/resources/templates/vat/lisp/show_lisp_status.vat b/resources/templates/vat/lisp/show_lisp_status.vat
deleted file mode 100644
index 8d4e237ecc..0000000000
--- a/resources/templates/vat/lisp/show_lisp_status.vat
+++ /dev/null
@@ -1 +0,0 @@
-show_lisp_status
diff --git a/resources/templates/vat/show_hardware_detail.vat b/resources/templates/vat/show_hardware_detail.vat
deleted file mode 100644
index e3ac7c7576..0000000000
--- a/resources/templates/vat/show_hardware_detail.vat
+++ /dev/null
@@ -1 +0,0 @@
-exec show hardware detail
diff --git a/resources/templates/vat/vpp_route_add.vat b/resources/templates/vat/vpp_route_add.vat
deleted file mode 100644
index 73bb5acf8a..0000000000
--- a/resources/templates/vat/vpp_route_add.vat
+++ /dev/null
@@ -1 +0,0 @@
-ip_route_add_del {network}/{prefix_length} {vrf} {count} {multipath} {via} {sw_if_index} \ No newline at end of file
diff --git a/resources/templates/vcl/vcl_dma.conf b/resources/templates/vcl/vcl_dma.conf
new file mode 100644
index 0000000000..46c578b770
--- /dev/null
+++ b/resources/templates/vcl/vcl_dma.conf
@@ -0,0 +1,9 @@
+vcl {
+ segment-size 4000000000
+ add-segment-size 4000000000
+ rx-fifo-size 4000000
+ tx-fifo-size 4000000
+ use-mq-eventfd
+ event-queue-size 500000
+ api-socket-name /run/vpp/api.sock
+}
diff --git a/resources/templates/vcl/vcl_iperf3.conf b/resources/templates/vcl/vcl_iperf3.conf
index 9e4b0571dd..adf6c181bc 100644
--- a/resources/templates/vcl/vcl_iperf3.conf
+++ b/resources/templates/vcl/vcl_iperf3.conf
@@ -1,7 +1,12 @@
vcl {
+ segment-size 4000000000
+ add-segment-size 4000000000
rx-fifo-size 4000000
tx-fifo-size 4000000
app-scope-local
app-scope-global
- api-socket-name /run/vpp/api.sock
-} \ No newline at end of file
+
+ # This must be kept in sync with vpp_hoststack_attr{app_api_socket}
+ # in .../resources/libraries/robot/hoststack/hoststack.robot
+ app-socket-api /run/vpp/app_ns_sockets/default
+}
diff --git a/resources/templates/vcl/vcl_nginx.conf b/resources/templates/vcl/vcl_nginx.conf
new file mode 100644
index 0000000000..80cf0c6808
--- /dev/null
+++ b/resources/templates/vcl/vcl_nginx.conf
@@ -0,0 +1,12 @@
+vcl {
+ segment-size 4000000000
+ add-segment-size 4000000000
+ rx-fifo-size 4000000
+ tx-fifo-size 4000000
+ use-mq-eventfd
+ event-queue-size 500000
+
+ # This must be kept in sync with vpp_hoststack_attr{app_api_socket}
+ # in .../resources/libraries/robot/hoststack/hoststack.robot
+ app-socket-api /run/vpp/app_ns_sockets/default
+} \ No newline at end of file
diff --git a/resources/templates/vm/init.sh b/resources/templates/vm/init.sh
index 8edb40f411..471b3ccba9 100644
--- a/resources/templates/vm/init.sh
+++ b/resources/templates/vm/init.sh
@@ -1,6 +1,7 @@
#!/bin/bash
mkdir /dev/pts
mkdir /dev/hugepages
+mkdir /dev/shm
mount -t devpts -o "rw,noexec,nosuid,gid=5,mode=0620" devpts /dev/pts || true
mount -t tmpfs -o "rw,noexec,nosuid,size=10%,mode=0755" tmpfs /run
mount -t tmpfs -o "rw,noexec,nosuid,size=10%,mode=0755" tmpfs /tmp