This will probably be more convenient than reading the strace log:Ĭreate a test network namespace: ip netns add testĬreate a pair of virtual network interfaces (veth-a and veth-b): ip link add veth-a type veth peer name veth-bĬhange the active namespace of the veth-a interface: ip link set veth-a netns testĬonfigure the IP addresses of the virtual interfaces: ip netns exec test ifconfig veth-a up 192.168.163.1 netmask 255.255.255.0 Otherwise, but that's specific to Linux, you can run the process in an isolated network namespace and use wireshark to monitor the traffic. To monitor an existing process with a known PID: strace -p $PID -f -e trace=network -s 10000 To start and monitor an new process: strace -f -e trace=network -s 10000 PROCESS ARGUMENTS I found this answer on askubuntu, but it's valid for Unix:
0 Comments
Leave a Reply. |