diff options
Diffstat (limited to 'vnfs/VESreporting_vLB5.0')
-rw-r--r-- | vnfs/VESreporting_vLB5.0/Makefile | 10 | ||||
-rw-r--r-- | vnfs/VESreporting_vLB5.0/README.md | 3 | ||||
-rwxr-xr-x | vnfs/VESreporting_vLB5.0/go-client_2_collector.sh | 8 | ||||
-rw-r--r-- | vnfs/VESreporting_vLB5.0/vpp_measurement_reporter.c | 4 |
4 files changed, 21 insertions, 4 deletions
diff --git a/vnfs/VESreporting_vLB5.0/Makefile b/vnfs/VESreporting_vLB5.0/Makefile index f5a4da9e..a9eb05e1 100644 --- a/vnfs/VESreporting_vLB5.0/Makefile +++ b/vnfs/VESreporting_vLB5.0/Makefile @@ -1,4 +1,3 @@ - ############################################################################# # # Copyright © 2017 AT&T Intellectual Property. All rights reserved. @@ -17,6 +16,7 @@ ############################################################################# CC=gcc + ARCH=$(shell getconf LONG_BIT) CODE_ROOT=$(CURDIR)/../.. LIBS_DIR=$(CODE_ROOT)/libs/x86_$(ARCH) @@ -37,4 +37,10 @@ vpp_measurement_reporter: vpp_measurement_reporter.c $(CC) $(CPPFLAGS) $(CFLAGS) -o vpp_measurement_reporter \ -L $(LIBS_DIR) \ -I $(INCLUDE_DIR) \ - vpp_measurement_reporter.c -lm -lpthread -level -lcurl + vpp_measurement_reporter.c \ + -lpthread \ + -level \ + -lm \ + -lcurl + + diff --git a/vnfs/VESreporting_vLB5.0/README.md b/vnfs/VESreporting_vLB5.0/README.md index 598b207d..1b3dd481 100644 --- a/vnfs/VESreporting_vLB5.0/README.md +++ b/vnfs/VESreporting_vLB5.0/README.md @@ -22,5 +22,6 @@ To run the vpp_measurement_reporter, please execute the following steps: - Make the go-client.sh script executable chmod +x go-client.sh - - Run the go-client.sh script + - Run one of the scripts based on one collector or 2 collectors ./go-client.sh + ./go-client_2_collector.sh diff --git a/vnfs/VESreporting_vLB5.0/go-client_2_collector.sh b/vnfs/VESreporting_vLB5.0/go-client_2_collector.sh new file mode 100755 index 00000000..3fe872ea --- /dev/null +++ b/vnfs/VESreporting_vLB5.0/go-client_2_collector.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export LD_LIBRARY_PATH="/opt/VES/libs/x86_64/" +DCAE_COLLECTOR_IP=$(cat /opt/config/dcae_collector_ip.txt) +DCAE_COLLECTOR_PORT=$(cat /opt/config/dcae_collector_port.txt) +DCAE_COLLECTOR_IP2=$(cat /opt/config/dcae_collector_ip2.txt) +DCAE_COLLECTOR_PORT2=$(cat /opt/config/dcae_collector_port2.txt) +./vpp_measurement_reporter $DCAE_COLLECTOR_IP $DCAE_COLLECTOR_PORT $DCAE_COLLECTOR_IP2 $DCAE_COLLECTOR_PORT2 eth1 diff --git a/vnfs/VESreporting_vLB5.0/vpp_measurement_reporter.c b/vnfs/VESreporting_vLB5.0/vpp_measurement_reporter.c index 78050498..d641f95f 100644 --- a/vnfs/VESreporting_vLB5.0/vpp_measurement_reporter.c +++ b/vnfs/VESreporting_vLB5.0/vpp_measurement_reporter.c @@ -129,6 +129,8 @@ int main(int argc, char** argv) port2 = atoi(argv[4]); vnic = argv[5]; } + else + vnic = argv[3]; MEASUREMENT_VNIC_PERFORMANCE * vnic_performance = NULL; @@ -233,7 +235,7 @@ int main(int argc, char** argv) } vpp_m = evel_new_measurement(READ_INTERVAL,"vLoadBalancer","TrafficStats_1.2.3.4"); - vnic_performance = (MEASUREMENT_VNIC_PERFORMANCE *)evel_measurement_new_vnic_performance("eth0", "true"); + vnic_performance = (MEASUREMENT_VNIC_PERFORMANCE *)evel_measurement_new_vnic_performance(vnic, "true"); evel_meas_vnic_performance_add(vpp_m, vnic_performance); if(vpp_m != NULL) { |