Update dev.sh

M. Mert Yıldıran 2022-01-17 16:30:47 +03:00
parent b55be62496
commit f4bac440d5

@ -191,20 +191,24 @@ Save this script to a file named `dev.sh`:
```bash
#!/bin/bash
rm -rf entries/ && mkdir -p entries && rm -rf pprof/* && make clean && make agent
rm -rf entries/ && mkdir -p entries && \
rm -rf pprof/* && make clean && make agent && \
sudo setcap cap_net_raw,cap_net_admin=eip ./agent/build/mizuagent
./agent/build/mizuagent --api-server & \
basenine -port 9099 & \
PID1=$! && \
./agent/build/mizuagent --api-server & \
PID2=$! && \
sleep 0.5 && \
GOGC=12800 NODE_NAME=dev \
./agent/build/mizuagent \
-i any \
--tap \
--api-server-address ws://localhost:8899/wsTapper & \
PID2=$! && \
PID3=$! && \
read -r -d '' _ </dev/tty
kill -9 $PID1 && \
kill -9 $PID2
kill -9 $PID2 && \
kill -9 $PID3
```
> Replace `-i any \` line with `-r http.cap \` for working on a [PCAP](https://en.wikipedia.org/wiki/Pcap) file. (e.g. [http.cap](https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=http.cap))