summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-11-08 18:19:13 +0800
committerluwenpeng <[email protected]>2024-11-08 18:47:06 +0800
commit37c0b1b783f53ba7dab1658315019805bcc415c8 (patch)
treee6a29d30676dd051493182be8ef7279472aa2cb1
parent4f48b59b703c4ab40b655e7f79b581b462da0440 (diff)
PacketAdapter移除FieldStat2,为适配AArch64做准备
-rw-r--r--.gitlab-ci.yml114
-rw-r--r--ci/travis.sh14
-rw-r--r--conf/packet_adapter.conf7
-rw-r--r--platform/CMakeLists.txt2
-rw-r--r--platform/include/packet_stat.h3
-rw-r--r--platform/src/packet_adapter.cpp4
-rw-r--r--platform/src/packet_stat.cpp150
-rw-r--r--vendor/CMakeLists.txt10
8 files changed, 79 insertions, 225 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 092562b..864ba36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,122 +3,12 @@ variables:
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
INSTALL_PREFIX: "/opt/tsg/packet_adapter"
TESTING_VERSION_BUILD: 0
- BUILD_IMAGE_CENTOS7: "git.mesalab.cn:7443/mesa_platform/build-env:master"
BUILD_IMAGE_CENTOS8: "git.mesalab.cn:7443/mesa_platform/build-env:rockylinux"
stages:
- build
###############################################################################
-# compile use image: build-env:master
-###############################################################################
-
-.build_by_travis_for_centos7:
- image: $BUILD_IMAGE_CENTOS7
- before_script:
- - mkdir -p $BUILD_PADDING_PREFIX/$CI_PROJECT_NAMESPACE/
- - ln -s $CI_PROJECT_DIR $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
- - cd $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
- - chmod +x ./ci/travis.sh
- - yum install -y libnetfilter_queue-devel
- - yum install -y elfutils-libelf-devel
- script:
- - yum makecache
- - ./ci/travis.sh
- tags:
- - share
-
-branch_build_debug_for_centos7:
- stage: build
- extends: .build_by_travis_for_centos7
- variables:
- BUILD_TYPE: Debug
- except:
- - /^develop-.*$/i
- - /^release-.*$/i
- - tags
-
-branch_build_release_for_centos7:
- stage: build
- variables:
- BUILD_TYPE: RelWithDebInfo
- extends: .build_by_travis_for_centos7
- except:
- - /^develop-.*$/i
- - /^release-.*$/i
- - tags
-
-develop_build_debug_for_centos7:
- stage: build
- extends: .build_by_travis_for_centos7
- variables:
- TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
- BUILD_TYPE: Debug
-# ASAN_OPTION: ADDRESS
- PACKAGE: 1
- PULP3_REPO_NAME: tsg-testing-x86_64.el7
- PULP3_DIST_NAME: tsg-testing-x86_64.el7
- artifacts:
- name: "packet_adapter-develop-$CI_COMMIT_REF_NAME-debug"
- paths:
- - build/*.rpm
- only:
- - /^develop-.*$/i
- - /^release-.*$/i
-
-develop_build_release_for_centos7:
- stage: build
- extends: .build_by_travis_for_centos7
- variables:
- TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
-# ASAN_OPTION: ADDRESS
- BUILD_TYPE: RelWithDebInfo
- PACKAGE: 1
- PULP3_REPO_NAME: tsg-testing-x86_64.el7
- PULP3_DIST_NAME: tsg-testing-x86_64.el7
- artifacts:
- name: "packet_adapter-develop-$CI_COMMIT_REF_NAME-release"
- paths:
- - build/*.rpm
- only:
- - /^develop-.*$/i
- - /^release-.*$/i
-
-release_build_debug_for_centos7:
- stage: build
- variables:
- UPLOAD_SYMBOL_FILES: 1
- BUILD_TYPE: Debug
- PACKAGE: 1
- PULP3_REPO_NAME: tsg-stable-x86_64.el7
- PULP3_DIST_NAME: tsg-stable-x86_64.el7
- extends: .build_by_travis_for_centos7
- artifacts:
- name: "packet_adapter-install-$CI_COMMIT_REF_NAME-debug"
- paths:
- - build/*.rpm
- only:
- - tags
-
-release_build_release_for_centos7:
- stage: build
- variables:
- BUILD_TYPE: RelWithDebInfo
- UPLOAD_SYMBOL_FILES: 1
- PACKAGE: 1
- PULP3_REPO_NAME: tsg-stable-x86_64.el7
- PULP3_DIST_NAME: tsg-stable-x86_64.el7
- extends: .build_by_travis_for_centos7
- artifacts:
- name: "packet_adapter-install-$CI_COMMIT_REF_NAME-release"
- paths:
- - build/*.rpm
- only:
- - tags
-
-###############################################################################
# compile use image: build-env:rockylinux
###############################################################################
@@ -162,7 +52,6 @@ develop_build_debug_for_centos8:
extends: .build_by_travis_for_centos8
variables:
TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
BUILD_TYPE: Debug
# ASAN_OPTION: ADDRESS
PACKAGE: 1
@@ -181,7 +70,6 @@ develop_build_release_for_centos8:
extends: .build_by_travis_for_centos8
variables:
TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
# ASAN_OPTION: ADDRESS
BUILD_TYPE: RelWithDebInfo
PACKAGE: 1
@@ -198,7 +86,6 @@ develop_build_release_for_centos8:
release_build_debug_for_centos8:
stage: build
variables:
- UPLOAD_SYMBOL_FILES: 1
BUILD_TYPE: Debug
PACKAGE: 1
PULP3_REPO_NAME: tsg-stable-x86_64.el8
@@ -215,7 +102,6 @@ release_build_release_for_centos8:
stage: build
variables:
BUILD_TYPE: RelWithDebInfo
- UPLOAD_SYMBOL_FILES: 1
PACKAGE: 1
PULP3_REPO_NAME: tsg-stable-x86_64.el8
PULP3_DIST_NAME: tsg-stable-x86_64.el8
diff --git a/ci/travis.sh b/ci/travis.sh
index 58adf53..3bc250d 100644
--- a/ci/travis.sh
+++ b/ci/travis.sh
@@ -34,14 +34,16 @@ env | sort
# Install dependency from YUM
#yum install -y libmnl-devel libnfnetlink-devel
-yum install -y mrzcpd numactl-devel
-yum install -y libMESA_field_stat2-devel
+yum install -y mrzcpd-corei7-4.*
+yum install -y numactl-devel
+yum install -y libfieldstat4-devel
yum install -y libMESA_handle_logger-devel
yum install -y libMESA_prof_load-devel
yum install -y libbreakpad_mini-devel
yum install -y libasan
yum install -y numactl-libs # required by mrzcpd
yum install -y libibverbs # required by mrzcpd
+yum install -y libuuid-devel
if [ $ASAN_OPTION ];then
source /opt/rh/devtoolset-7/enable
@@ -62,10 +64,4 @@ if [ -n "${PACKAGE}" ]; then
make package
cp ~/rpm_upload_tools.py ./
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
-fi
-
-if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
- rpm -i packet_adapter*debuginfo*.rpm
- cp /usr/lib/debug/opt/tsg/packet_adapter/bin/packet_adapter*debug /tmp/packet_adapter.debuginfo.${CI_COMMIT_SHORT_SHA}
- sentry-cli upload-dif -t elf /tmp/packet_adapter.debuginfo.${CI_COMMIT_SHORT_SHA}
-fi
+fi \ No newline at end of file
diff --git a/conf/packet_adapter.conf b/conf/packet_adapter.conf
index e220a7c..a019c54 100644
--- a/conf/packet_adapter.conf
+++ b/conf/packet_adapter.conf
@@ -8,11 +8,4 @@ app_device=eth_nf_packet_adapter
[stat]
output_file=log/packet_adapter.fs2
-statsd_server=127.0.0.1
-statsd_port=8100
-# 1 : FS_OUTPUT_STATSD
-# 2 : FS_OUTPUT_INFLUX_LINE
-statsd_format=1
statsd_cycle=2
-prometheus_listen_port=9001
-prometheus_listen_url=/packet_adapter_prometheus \ No newline at end of file
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt
index 48fc431..cdbe9f2 100644
--- a/platform/CMakeLists.txt
+++ b/platform/CMakeLists.txt
@@ -10,7 +10,7 @@ target_include_directories(packet_adapter PUBLIC ${CMAKE_CURRENT_LIST_DIR}/inclu
target_link_libraries(packet_adapter common)
target_link_libraries(packet_adapter pthread)
-target_link_libraries(packet_adapter MESA_field_stat)
+target_link_libraries(packet_adapter fieldstat4)
install(TARGETS packet_adapter RUNTIME DESTINATION bin COMPONENT Program)
add_subdirectory(test) \ No newline at end of file
diff --git a/platform/include/packet_stat.h b/platform/include/packet_stat.h
index 3e56cd8..1d8ba84 100644
--- a/platform/include/packet_stat.h
+++ b/platform/include/packet_stat.h
@@ -10,8 +10,7 @@ struct packet_stat;
struct packet_stat *packet_stat_create(const char *profile);
void packet_stat_destory(struct packet_stat *handle);
-void packet_stat_output(struct packet_stat *handle, struct metrics *metrics);
-int packet_stat_cycle(struct packet_stat *handle);
+void packet_stat_flush(struct packet_stat *handle, struct metrics *metrics);
#ifdef __cpluscplus
}
diff --git a/platform/src/packet_adapter.cpp b/platform/src/packet_adapter.cpp
index 6fa94f0..3075c81 100644
--- a/platform/src/packet_adapter.cpp
+++ b/platform/src/packet_adapter.cpp
@@ -227,8 +227,8 @@ int main(int argc, char **argv)
while (!runtime->need_stop)
{
- packet_stat_output(runtime->stat, &runtime->metrics);
- sleep(packet_stat_cycle(runtime->stat));
+ packet_stat_flush(runtime->stat, &runtime->metrics);
+ sleep(1);
}
error:
diff --git a/platform/src/packet_stat.cpp b/platform/src/packet_stat.cpp
index d9d3e40..c3f41c4 100644
--- a/platform/src/packet_stat.cpp
+++ b/platform/src/packet_stat.cpp
@@ -1,7 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <MESA/field_stat2.h>
+#include <fieldstat/fieldstat_easy.h>
#include <MESA/MESA_prof_load.h>
#include "log.h"
@@ -55,45 +55,38 @@ static const char *stat_map[] =
struct stat_config
{
char output_file[256];
- char statsd_server[32];
- int statsd_port;
- int statsd_format;
int statsd_cycle;
-
- int prometheus_listen_port;
- char prometheus_listen_url[256];
};
struct packet_stat
{
struct stat_config config;
- screen_stat_handle_t fs_handle;
+ struct fieldstat_easy *fs_handle;
int fs_id[512];
};
static void packet_stat_config(const char *profile, struct stat_config *config)
{
MESA_load_profile_string_def(profile, "STAT", "output_file", config->output_file, sizeof(config->output_file), "log/packet_adapter.fs2");
- MESA_load_profile_string_def(profile, "STAT", "statsd_server", config->statsd_server, sizeof(config->statsd_server), "127.0.0.1");
- MESA_load_profile_int_def(profile, "STAT", "statsd_port", &(config->statsd_port), 8100);
- MESA_load_profile_int_def(profile, "STAT", "statsd_format", &(config->statsd_format), 1); // FS_OUTPUT_STATSD=1, FS_OUTPUT_INFLUX_LINE=2
MESA_load_profile_int_def(profile, "STAT", "statsd_cycle", &(config->statsd_cycle), 1);
- MESA_load_profile_int_def(profile, "STAT", "prometheus_listen_port", &(config->prometheus_listen_port), 9001);
- MESA_load_profile_string_def(profile, "STAT", "prometheus_listen_url", config->prometheus_listen_url, sizeof(config->prometheus_listen_url), "/packet_prometheus");
+ LOG_DEBUG("STAT->output_file : %s", config->output_file);
+ LOG_DEBUG("STAT->statsd_cycle : %d", config->statsd_cycle);
+}
- if (config->statsd_format != 1 && config->statsd_format != 2)
+void packet_stat_destory(struct packet_stat *handle)
+{
+ if (handle)
{
- config->statsd_format = 1;
- }
+ if (handle->fs_handle)
+ {
+ fieldstat_easy_free(handle->fs_handle);
+ handle->fs_handle = NULL;
+ }
- LOG_DEBUG("STAT->output_file : %s", config->output_file);
- LOG_DEBUG("STAT->statsd_server : %s", config->statsd_server);
- LOG_DEBUG("STAT->statsd_port : %d", config->statsd_port);
- LOG_DEBUG("STAT->statsd_format : %d", config->statsd_format);
- LOG_DEBUG("STAT->statsd_cycle : %d", config->statsd_cycle);
- LOG_DEBUG("STAT->prometheus_listen_port : %d", config->prometheus_listen_port);
- LOG_DEBUG("STAT->prometheus_listen_url : %s", config->prometheus_listen_url);
+ free(handle);
+ handle = NULL;
+ }
}
struct packet_stat *packet_stat_create(const char *profile)
@@ -103,79 +96,66 @@ struct packet_stat *packet_stat_create(const char *profile)
packet_stat_config(profile, &handle->config);
- FS_library_set_prometheus_port(handle->config.prometheus_listen_port);
- FS_library_set_prometheus_url_path(handle->config.prometheus_listen_url);
- FS_library_init();
-
- int value = 0;
- handle->fs_handle = FS_create_handle(); // TODO memleak no free() API
- FS_set_para(handle->fs_handle, APP_NAME, "packet_adapter", 13);
- FS_set_para(handle->fs_handle, OUTPUT_DEVICE, handle->config.output_file, strlen(handle->config.output_file));
- value = 1;
- FS_set_para(handle->fs_handle, OUTPUT_PROMETHEUS, &value, sizeof(value));
- value = 1;
- FS_set_para(handle->fs_handle, PRINT_MODE, &value, sizeof(value));
- value = 0;
- FS_set_para(handle->fs_handle, CREATE_THREAD, &value, sizeof(value));
-
- if (strlen(handle->config.statsd_server) > 0 && handle->config.statsd_port != 0)
+ handle->fs_handle = fieldstat_easy_new(1, "packet_adapter", NULL, 0);
+ if (handle->fs_handle == NULL)
{
- FS_set_para(handle->fs_handle, STATS_SERVER_IP, handle->config.statsd_server, strlen(handle->config.statsd_server));
- FS_set_para(handle->fs_handle, STATS_SERVER_PORT, &(handle->config.statsd_port), sizeof(handle->config.statsd_port));
- FS_set_para(handle->fs_handle, STATS_FORMAT, &handle->config.statsd_format, sizeof(handle->config.statsd_format));
+ LOG_ERROR("fieldstat_easy_new failed");
+ goto error_out;
}
- for (int i = 0; i < STAT_MAX; i++)
+ if (fieldstat_easy_enable_auto_output(handle->fs_handle, handle->config.output_file, handle->config.statsd_cycle) != 0)
{
- handle->fs_id[i] = FS_register(handle->fs_handle, FS_STYLE_FIELD, FS_CALC_CURRENT, stat_map[i]);
+ LOG_ERROR("fieldstat_easy_enable_auto_output failed");
+ goto error_out;
}
- FS_start(handle->fs_handle);
-
- return handle;
-}
-
-void packet_stat_destory(struct packet_stat *handle)
-{
- if (handle)
+ for (int i = 0; i < STAT_MAX; i++)
{
- FS_library_destroy();
- free(handle);
- handle = NULL;
+ handle->fs_id[i] = fieldstat_easy_register_counter(handle->fs_handle, stat_map[i]);
}
-}
-
-void packet_stat_output(struct packet_stat *handle, struct metrics *metrics)
-{
- FS_operate(handle->fs_handle, handle->fs_id[STAT_RX_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->rx_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_RX_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->rx_bytes)));
-
- FS_operate(handle->fs_handle, handle->fs_id[STAT_RX_ERR_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->rx_err_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_RX_ERR_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->rx_err_bytes)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_SUCC_TX_V4_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->succ_tx_v4_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_SUCC_TX_V4_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->succ_tx_v4_bytes)));
-
- FS_operate(handle->fs_handle, handle->fs_id[STAT_SUCC_TX_V6_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->succ_tx_v6_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_SUCC_TX_V6_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->succ_tx_v6_bytes)));
-
- FS_operate(handle->fs_handle, handle->fs_id[STAT_ERR_TX_V4_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->err_tx_v4_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_ERR_TX_V4_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->err_tx_v4_bytes)));
-
- FS_operate(handle->fs_handle, handle->fs_id[STAT_ERR_TX_V6_PKT], 0, FS_OP_SET, ATOMIC_READ(&(metrics->err_tx_v6_pkts)));
- FS_operate(handle->fs_handle, handle->fs_id[STAT_ERR_TX_V6_B], 0, FS_OP_SET, ATOMIC_READ(&(metrics->err_tx_v6_bytes)));
+ return handle;
- FS_passive_output(handle->fs_handle);
+error_out:
+ packet_stat_destory(handle);
+ return NULL;
}
-int packet_stat_cycle(struct packet_stat *handle)
+void packet_stat_flush(struct packet_stat *handle, struct metrics *metrics)
{
- if (handle)
- {
- return handle->config.statsd_cycle;
- }
- else
- {
- return 0;
- }
+ static struct metrics last_metrics = {0};
+ struct metrics curr_metrics = {
+ .rx_pkts = ATOMIC_READ(&(metrics->rx_pkts)),
+ .rx_bytes = ATOMIC_READ(&(metrics->rx_bytes)),
+ .rx_err_pkts = ATOMIC_READ(&(metrics->rx_err_pkts)),
+ .rx_err_bytes = ATOMIC_READ(&(metrics->rx_err_bytes)),
+ .succ_tx_v4_pkts = ATOMIC_READ(&(metrics->succ_tx_v4_pkts)),
+ .succ_tx_v4_bytes = ATOMIC_READ(&(metrics->succ_tx_v4_bytes)),
+ .succ_tx_v6_pkts = ATOMIC_READ(&(metrics->succ_tx_v6_pkts)),
+ .succ_tx_v6_bytes = ATOMIC_READ(&(metrics->succ_tx_v6_bytes)),
+ .err_tx_v4_pkts = ATOMIC_READ(&(metrics->err_tx_v4_pkts)),
+ .err_tx_v4_bytes = ATOMIC_READ(&(metrics->err_tx_v4_bytes)),
+ .err_tx_v6_pkts = ATOMIC_READ(&(metrics->err_tx_v6_pkts)),
+ .err_tx_v6_bytes = ATOMIC_READ(&(metrics->err_tx_v6_bytes)),
+ };
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_RX_PKT], NULL, 0, curr_metrics.rx_pkts - last_metrics.rx_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_RX_B], NULL, 0, curr_metrics.rx_bytes - last_metrics.rx_bytes);
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_RX_ERR_PKT], NULL, 0, curr_metrics.rx_err_pkts - last_metrics.rx_err_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_RX_ERR_B], NULL, 0, curr_metrics.rx_err_bytes - last_metrics.rx_err_bytes);
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_SUCC_TX_V4_PKT], NULL, 0, curr_metrics.succ_tx_v4_pkts - last_metrics.succ_tx_v4_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_SUCC_TX_V4_B], NULL, 0, curr_metrics.succ_tx_v4_bytes - last_metrics.succ_tx_v4_bytes);
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_SUCC_TX_V6_PKT], NULL, 0, curr_metrics.succ_tx_v6_pkts - last_metrics.succ_tx_v6_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_SUCC_TX_V6_B], NULL, 0, curr_metrics.succ_tx_v6_bytes - last_metrics.succ_tx_v6_bytes);
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_ERR_TX_V4_PKT], NULL, 0, curr_metrics.err_tx_v4_pkts - last_metrics.err_tx_v4_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_ERR_TX_V4_B], NULL, 0, curr_metrics.err_tx_v4_bytes - last_metrics.err_tx_v4_bytes);
+
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_ERR_TX_V6_PKT], NULL, 0, curr_metrics.err_tx_v6_pkts - last_metrics.err_tx_v6_pkts);
+ fieldstat_easy_counter_incrby(handle->fs_handle, 0, handle->fs_id[STAT_ERR_TX_V6_B], NULL, 0, curr_metrics.err_tx_v6_bytes - last_metrics.err_tx_v6_bytes);
+
+ last_metrics = curr_metrics;
} \ No newline at end of file
diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt
index ed74870..7cff521 100644
--- a/vendor/CMakeLists.txt
+++ b/vendor/CMakeLists.txt
@@ -32,12 +32,12 @@ add_library(MESA_prof_load SHARED IMPORTED GLOBAL)
set_property(TARGET MESA_prof_load PROPERTY IMPORTED_LOCATION ${MESA_FRAMEWORK_LIB_DIR}/libMESA_prof_load.so)
set_property(TARGET MESA_prof_load PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MESA_FRAMEWORK_INCLUDE_DIR})
-add_library(MESA_field_stat SHARED IMPORTED GLOBAL)
-set_property(TARGET MESA_field_stat PROPERTY IMPORTED_LOCATION ${MESA_FRAMEWORK_LIB_DIR}/libMESA_field_stat2.so)
-set_property(TARGET MESA_field_stat PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MESA_FRAMEWORK_INCLUDE_DIR})
+add_library(fieldstat4 SHARED IMPORTED GLOBAL)
+set_property(TARGET fieldstat4 PROPERTY IMPORTED_LOCATION ${MESA_FRAMEWORK_LIB_DIR}/libfieldstat4.so)
+set_property(TARGET fieldstat4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MESA_FRAMEWORK_INCLUDE_DIR})
-set(MRZCPD_LIB_DIR /opt/mrzcpd/lib)
-set(MRZCPD_INCLUDE_DIR /opt/mrzcpd/include)
+set(MRZCPD_LIB_DIR /opt/tsg/mrzcpd/corei7/lib)
+set(MRZCPD_INCLUDE_DIR /opt/tsg/mrzcpd/corei7/include)
add_library(mrzcpd SHARED IMPORTED GLOBAL)
set_property(TARGET mrzcpd PROPERTY IMPORTED_LOCATION ${MRZCPD_LIB_DIR}/libmarsio.so)