Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions ebpf-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,25 @@ fi

while :
do
if [[ "${ENABLE_LOGS}" == "false" ]]; then
./ebpf-logging >> "$LOG_FILE" 2>&1
else
./ebpf-logging
fi
# Start the mirroring module in the background
if [[ "${ENABLE_LOGS}" == "false" ]]; then
./ebpf-logging >> "$LOG_FILE" 2>&1 &
else
./ebpf-logging &
fi
mirroring_pid=$!

# Monitor the process for 1 hour
elapsed=0
while [ $elapsed -lt 600 ]; do
if ! kill -0 $mirroring_pid 2>/dev/null; then
break
fi
sleep 2
elapsed=$((elapsed + 2))
done

# Kill the mirroring process after 1 hour or if it stopped
kill $mirroring_pid 2>/dev/null
sleep 2
done
2 changes: 1 addition & 1 deletion trafficUtil/kafkaUtil/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func getKafkaWriter(kafkaURL string, batchSize int, batchTimeout time.Duration)
WriteTimeout: batchTimeout,
Async: true,
Balancer: &kafka.Hash{},
Compression: kafka.Zstd,
Compression: kafka.Lz4,
}

if useTLS {
Expand Down
Loading