16 #include <gm_metric.h>
32 const char* str_params =
vpp_module.module_params;
33 apr_array_header_t *list_params =
vpp_module.module_params_list;
35 char *chroot_path = 0;
40 clib_warning(
"[mod_vpp]Received string params: %s", str_params);
44 clib_warning(
"[mod_vpp]Received following params list: ");
45 params = (mmparam*) list_params->elts;
46 for(
i=0; i< list_params->nelts;
i++) {
51 memset (ma, 0,
sizeof (*ma));
61 MMETRIC_INIT_METADATA(&(
vpp_module.metrics_info[
i]),p);
62 MMETRIC_ADD_METADATA(&(
vpp_module.metrics_info[
i]),MGROUP,
"VPP");
77 f64 *vector_ratep, *vpp_rx_ratep, *sig_error_ratep;
79 switch (metric_index) {
82 (
svmdb_client,
"vpp_vector_rate",
sizeof (*vector_ratep));
84 val.d = *vector_ratep;
93 "vpp_pid",
sizeof (*vpp_pidp));
94 if (vpp_pidp && *vpp_pidp) {
95 if (kill(*vpp_pidp, 0) == 0 || errno != ESRCH) {
107 (
svmdb_client,
"vpp_input_rate",
sizeof (*vector_ratep));
109 val.d = *vpp_rx_ratep;
117 (
svmdb_client,
"vpp_sig_error_rate",
sizeof (*vector_ratep));
118 if (sig_error_ratep) {
119 val.d = *sig_error_ratep;
134 {0,
"Vector_Rate", 100, GANGLIA_VALUE_DOUBLE,
"Packets/Frame",
136 UDP_HEADER_SIZE+8,
"VPP Vector Rate"},
137 {0,
"VPP_State", 100, GANGLIA_VALUE_DOUBLE,
"Run=1",
"both",
"%.0f",
138 UDP_HEADER_SIZE+8,
"VPP State"},
139 {0,
"Input_Rate", 100, GANGLIA_VALUE_DOUBLE,
"5 sec RX rate",
141 UDP_HEADER_SIZE+8,
"VPP Aggregate RX Rate"},
142 {0,
"Sig_Error_Rate", 100, GANGLIA_VALUE_DOUBLE,
143 "5 sec significant error rate",
145 UDP_HEADER_SIZE+8,
"VPP Significant Error Rate"},