We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ strace -e trace=network -f -p <pid> -o trace.log
For example, the following output:
16652 socket(PF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 783 16652 setsockopt(783, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 16652 connect(783, {sa_family=AF_INET, sin_port=htons(6443), sin_addr=inet_addr("10.212.173.184")}, 16) = -1 ENETUNREACH (Network is unreachable)
Here 16652 is the thread ID.
16652
$ ls -al /proc/<pid>/task/<threadid>/ns/net
$ nsenter --net=/proc/<pid>/task/<threadid>/ns/net ip a s
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Find the thread using strace
$ strace -e trace=network -f -p <pid> -o trace.log
For example, the following output:
Here
16652
is the thread ID.Get the network namespace the thread is using
$ ls -al /proc/<pid>/task/<threadid>/ns/net
Attach to that network namespace
$ nsenter --net=/proc/<pid>/task/<threadid>/ns/net ip a s
The text was updated successfully, but these errors were encountered: