I have a Linux process with let's say 10 threads. Some of them make network traffic. From another thread or it can be even within another process I need to find out which threads have network activity. Therefore I need a way to read, either through a syscall or file system, i.e /proc this information. I'm interested in any type of network traffic that can tell me if a particular thread within that process has any type of network activity.

So I've tried to parse /proc/pid/task/net/* files, however, I always seem to get the same information regardless of which thread I query. I don't understand why...? I did the same for File IO, but that's much easier as /proc/pid/task/io provides a good summary. Important to me is to find per-thread not per-process network activity. (socket info, tcp, udp, icmp, etc).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.