#!/bin/sh
rm ./euspace
make -f Makefile2 all debug=1 pid=1121


# pid=`ps aux | grep ebpfdemo81 | grep -v grep | awk '{print $2}'`
# echo $pid
# TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=go SEND=1 FILTER_PID=$pid WHITE_LIST=".*HandleFunc|.*main.*|.*serverHandler.*|.*ServeHTTP.*" ./euspace --listen="0.0.0.0:8124"


# pid=`ps aux | grep ./helloworld | grep -v grep | awk '{print $2}'`
# echo $pid
# TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=java DBG_PATH="/data/roger/graalvm/simplehttpserver.debug" SEND=1 FILTER_PID=$pid WHITE_LIST="main.*|addwj.*" ./euspace  --listen="0.0.0.0:8123"


# pid=`ps aux | grep ./simplehttpserver | grep -v grep | awk '{print $2}'`
# echo $pid
# TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=java DBG_PATH="/data/roger/graalvm/simplehttpserver.debug" SEND=1 FILTER_PID=$pid WHITE_LIST="handle*|addw.*" ./euspace  --listen="0.0.0.0:8123"

# pid=`ps aux | grep ./simplehttpserver | grep -v grep | awk '{print $2}'`
# echo $pid
# TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=go DBG_PATH="" SEND=1 FILTER_PID=$pid WHITE_LIST="handle*|addw.*" ./euspace  --listen="0.0.0.0:8123"


pid=`ps aux | grep CoreAoT | grep -v grep | awk '{print $2}'`
echo $pid
CONFIG_SERVER=http://10.0.7.115:18080 DATA_SERVER=http://10.0.7.115:18080 TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=dotnet DBG_PATH="/data/roger/ebpfdemo/net8_demo/CoreAoT/bin/Debug/net8.0/linux-x64/publish/CoreAoT.dbg" SEND=1 FILTER_PID=$pid WHITE_LIST="main.*|Addwj.*|CoreAoT_Program___Main__.*" ./euspace  --listen="0.0.0.0:8124"

# pid=`ps aux | grep SimpleHttpServer | grep -v grep | awk '{print $2}'`
# echo $pid
# CONFIG_SERVER=http://10.0.7.115:18080 DATA_SERVER=http://10.0.7.115:18080 TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=java DBG_PATH="/data/roger/ebpfdemo/graalve_demo/SimpleHttpServer.dbg" SEND=1 FILTER_PID=$pid WHITE_LIST="handle*|addw.*" ./euspace  --listen="0.0.0.0:8124"


# pid=`pidof java`
# echo $pid
# TRACES_ENDPOINT=http://10.0.6.103:8099/docp/api/v2/data/receive BIN_TYPE=java DBG_PATH="" SEND=1 FILTER_PID=$pid WHITE_LIST="handle*|addw.*" ./euspace  --listen="0.0.0.0:8124"
